I have the following matrix keypad - enter image description here

I am using this as a sort of controller with my Arduino (Mega2560) but I can't get real multiple inputs to work. I am able to have say two individual keys pressed at a time but after that they overlap with eachother. (Using the Keypad library also).

Here is an illustration of the issue:

enter image description here

If I press the 3 blue buttons and use the getKeys function it thinks that the red one is also pressed. This works when any three or more buttons are pressed that produce a square.


1 Answer 1


I have a post about keypad matrices which discusses this issue. The issue with keypads is, that if you don't install diodes, if three keys are pressed the current finds its way around those three keys and it looks like a fourth is pressed.

Ghosting issue

If you install diodes, like this, the issue goes away:

Keypad with diodes

It can be a little tedious to do, but I managed it the other day with surface mounted diodes.

Keypad with surface-mounted diodes

The above board is different from yours, mine is one with soft switches which I could lift off to get at the board.

Yours looks like it might be almost impossible to cut the tracks and install the diodes. Without them you can press two keys at once without issues. Perhaps that is enough. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.