Prop Shaft Issues 86 Saltare

Was out this weekend when all of the sudden the boat would not move. I could see it was going into gear and everything looked like it was spinning. Dove under the boat thinking I lost the prop but it was still there. Got back in the boat and realized the shaft had come out of the coupler.... Got a tow back to the lift and everything looked fine (except for the 1/4" key was bent bad). Luckily the last time I tore my rudder apart I lost the key so bought 12" of key stock... Cut a new one and reset the shaft and the 2 set screws. They were wired together so I am not sure how they backed out. I put some blue on them this time and set them and all seems good so far...

Any thoughts as to how it would have come out??