Crankshaft placement is with the piston at TDC.
Here you can see the cutaway for the key. Only seen after removal of the magneto.
Here is the key installed. When installing key and magnet, super glue key in place, this makes for a much easier instillation of the magnet.
This is the proper position of the magnet with key intact and piston at TDC.
This is the incorrect magnet placement, with key installed and piston at TDC
Function....... The key keeps the magnet in place on the shaft, this key can shear off. The engine is totally dependent for voltage produced by the magnet rotating in the coil. If the magnet rotates on the shaft the coil won't put out voltage at the proper time for the plug to fire. The key is made from a softer material then either the magnet core or crankshaft. When the key shears off, like in the case of a backfire, the key will be the first to go, thus saving $$$$$$$$$