Latching switches for Button Box

I use latching switches in combination with a Teensy 4.1 and Spadnext. The programming triggers on the raising and falling edge and this works fine.