If you use a ON-OFF latching toggle or press switch, the button will remain ON - like press and hold a keyboard key; until turn OFF, but for modern games this don't matter.
But you can make the OF-OFF switch behave like real one.
Let's assume that one ON-OFF latching toggle switch is wired to MMjoy button #10 position - this is the "H/W button" ~ "hardware button" that need to be translate into a DirectX button to be visible for Windows/Games.
The basic configuration of this 1 = 1, 2 = 2... but can be more elaborated, example:
In the MMJoySetup - the firmware configurador; was defined that when the button #10 (H/W button) is turned ON will press the (Joystick) DirectX button number 1 and when turned OFF will press the (Joystick) DirectX button number 2.
Of course the game need to be coded the use a ley/button for turn ON something - e.g. cockpit lights, and another for turn OFF.
Some games, e.g IL-2: Great Battles have most of their commands for use the same key or button for do both things, by press once for ON, press again for OFF - like a keyboard; what don't fit for ON-OF latching toggle switches.
Exist a firmware for Arduino in what the DirectX button is only pressed briefly when the ON state of an ON-OFF switch is engaged, and again briefly when changed for OFF.
Is the Lynx Cub Firmware - but is only for button boxes, panels, don't handle analog or digital axes.