Read multiple keys at a time

Hello, i just ran into a problem with reading out multiple keys at a time from a matrix keypad.Its a 8x4 keypad.I used keypad.h before but this cant read out multiple keyes at a time.Can anyone help me?I have an arduino nano,and i want to create an midi controller.

keypad usually aren't meant to have multiple buttons pressed at once. I suspect the keypad library is coded to only pass one key press.

I ran into this a few years back when I wanted to make an adapter to let me use Atari Jaguar controller (wired like a 5x4 matrix) to an older game console, keypad library was screwing up everything. I ended up dumping the library, manually read the whole matrix, and passed every key press to the older game system.

So i have to read out manually without the library.
How i do this?i dont understand it:for example the 2:6 and the 3:5 keys are pressed at the same time, how i know its not the 2:5 and 3:6 keys are pressed?
Sorry for my bad english

zikuuart:
So i have to read out manually without the library.
How i do this?

On my controller project I had colums as input and rows as output. On the Arduino, the column were set as output and rows as input. I set one column high while the rest is low, then read in all the rows and store the value. Next I change the first column back to low, and set second column high and repeat. A bit messy but it lets me read everything.

i dont understand it:for example the 2:6 and the 3:5 keys are pressed at the same time, how i know its not the 2:5 and 3:6 keys are pressed?
Sorry for my bad english

That is called key rollover. This is why usually keypad are only checked for one button. Multiple button presses can cause confusion to the device like security system or even keyboard.

You would have to understand the key matrix and figure out what can go wrong when 2 or more buttons are pressed at the same time, then code to handle multiple keypresses.

thank you, i thinked this is easier

First i will do the midi keyboard without the multiple keypress function and the later i will add it

Take a look at my MIDI Controller library. It supports keyboard matrices as well.

Pieter

In order to detect multiple key presses you need a diode at each key contact. This is not possible with keypads due to the construction not allowing you to modify the keyboard like this.
Look at the keyboard section of this project for how to do it. Ignore any LED stuff.
http://www.thebox.myzen.co.uk/Hardware/Hexome.html