Usb keyboard with many simultaneous key presses

keyboard

I am looking to make a keyboard that allows for 2 or so keys pressed at the same time by the same finger. ie s and w would both register and a total of 8-10 keys registered at 1 time. the keyboard matrixes dont really allow for such. As such I suspect I will need to use quite a few inputs per chip. since I can get away with only needing 1 hand about 26 keys at the same time I might be able to do a twin matrix and split parts between the 2 hands sections so qhx7 could all be on 1 line instead of 1qaz which would cause blocking. the down side would be trace routing.

im not opposed to having say the left had being all direct inputs and then all the rest of the keys as a matrix.

Best Answer

If I were building a custom keyboard, I would use a keyboard matrix circuit and install a blocking diode for each and every keyswitch -- like practically all synthesizer keyboards. As Richman pointed out, this allows the keyboard controller to scan the matrix and directly sense exactly which keyswitches are being pressed, no matter how many keys are being pressed -- i.e., it has full N-key rollover.

Other popular ways of building a keyboard include:

Some people directly connect switches to input pins (rather than use a matrix). They don't need blocking diodes, so they save a few pennies, but they spend more on IC input pins and the trace layout is more complicated -- extra cost and complexity for no real benefit.

Most computer keyboard designers use a matrix without blocking diodes, saving a few pennies. Alas, that leads to "key ghosting" -- when certain combinations of 3 or more keys are pressed, a fourth phantom key will appear to be pressed. Most off-the-shelf computer keyboards "fix" key ghosting in software, by key blocking, sometimes simple "1-key rollover" (after 1 key has been pressed, ignore the keyboard until no keys are being pressed) or more complex "2-key rollover". There are ways for such a keyboard to correctly handle some combinations of more than 2 keys being pressed at one time, but it's complicated and inevitably results in other combinations not registering properly.