Pull it all apart and take better pics.
Near as I can guess, someone under tightened the crank bolt which allowed the terribly designed crank pulley to spin and shear the key/warp the keyway. Your best bet will be to see if the right side (as you're looking at the front of the engine) of the keyway is okay, find a new woodruff key, and shoot a weld into the gap on the left side of the keyway to hold the crank gear in place. The pulley will stay in place without the key if you torque the bolt properly, and doesn't need to align. The crank gear obviously has to align in order for the engine to run; thus you weld it in place to eliminate any play.