In my other sim I had a CH Throttle Quad, which has six 'rocker buttons' spring loaded to a centred position. I mapped one to Mags Both in the defaut/centred position. Up (while held) was Mags Off, and down was Start Engine (in case I held it up for too long.) This was for flying rotary engined craft, like the Camel.
Now in my AFS4, I have a Logitec yoke with the elevator trim button/slider mapped Up or Down, while held, and holding the new setting when returned to the spring-loaded centred position for neutral.
My coding skills are pretty rusty these days, but it seems to me the coding for those switches must be very similar to what Larry is looking for.
ATB
MikeW