The microswitch way you described is the best way I can think of, either that or a battleswitch I suppose.