Just tap the key back into the groove. Make sure your sprocket keyway is aligned before you try to install again.
I was putting a new crankshaft sprocket on and after it would not go any further, I felt around the snout and found this, so I removed the sprocket. Have I f'ed up something. What do I do now?