I posted some CAD drawings to stir the pot a bit around here and, of course, I've been too busy to reply.
The design
was inspired by the lock and tumbler mechanism, NYCPunk. Good catch.
I agree with pretty well all of the criticism leveled here. There ought to be a second 'pin' so as to refrain from sliding the spring end around the shaft and getting it caught on the holes. The pins should be beveled to better handle misalignment between the red output shaft and the gears. Also, as a matter of reference, there are six pins per gear on the model for no reason in particular other than to increase the chance of one pin grabbing a hole.
Best of all, since it'll give me something more to think about, I have no good answer for a method to ensure that the pins will release from one gear when the mechanism shifts.