Here's another idea I had whilst looking through the bits of my 5.25 drive.
A thing like a card slot, with photosensors inside it. And a credit card with holes drilled in the edge. Push it in to activate a microswitch at the back, but it will only work if the holes are in the right places.