I have a controller that I made out of SPST switch (the type with the "missile cover" type) and momentary buttons (so the ones that are normally closed, until you push them, and once released go back to the closed position). The matrix is a 7x6 using digital pins.
All works fine, as long as I press them one by one, or activate the switches one by one. but if I start to have the switches enabled, like 3 or 4 of them in the open position; and I press a button; instead of getting only the value of the button pressed, I trigger all the buttons that are in the same column/row of the button pressed.
I understand that I should not use SPST toggle switches for these cases; and just use buttons, but I am using this contraption, to play flight sim games, which require some switches to stay on or off (like engine fuel lines, lights and such; which require for realism purposes, to be either in the on or off position, so I can't use momentary toggle switches).
While reading, I discovered about ghosting and masking; and that a diode is used to fix issues with multiple buttons pressed, although I am not sure that this apply to the SPST; so before take apart the controller, I want to understand better what is the issue that I am experiencing.
My hardware is pretty simple: various switches and SPST connected on a 7x6 matrix; which goes to a teensy 3.1 (using all digital GPIO, not the analog ones). I can post the sketch if needed; it is a slightly modified version from this tutorial: https://www.instructables.com/id/How-to-Make-a-Custom-Control-Panel-for-Elite-Dange/