Accepting more simultaneous keyboard inputs

Sometimes a regular computer keyboard only accepts user inputs up to a certain key at a time. I have a Logitech keyboard that can accept up to 3-4 keystrokes at the same time. The computer does not accept any more input if you press more than 4 keys for this keyboard. And it also depends on some areas of your keyboard. In some places, you can press more keys (for example, arrow keys), while in some places you can only press 1-2 keys. It is also different from keyboard and keyboard. Some older keyboards accept only 1-2 keys.

This is not a problem with regular office work, but when it comes to games. For example, imagine a platform game in which you must simultaneously jump, attack and control the direction. This involves a few keystrokes, and some keyboards cannot accept such simultaneous input. However, I tried this in several games, and the number of possible keyboard inputs seems to be different too. Therefore, we have two problems:

  • Keyboards have a different number of simultaneous inputs.
  • In some games, you can accept more keyboard inputs than other games.

At first I thought it was only a hardware problem, but why do some programs behave differently? Why can some programs accept more keyboard input than other programs? So how can we write our programs to accept more keyboard inputs?

+6
keyboard user-input keyboard-events simultaneous
source share
3 answers

If you want this fixed, you need to buy a travel keyboard.

A program called GlovePie allows you to program input from different sources and can solve this problem. GlovePie download page here. ~

For example, I am developing an RPG game, and my laptop keyboard cannot detect the Run + Up + Left combination (run to the northeast). However, if I plug in my Logitech USB controller and map these exact keyboard keys (Up, Left, and B [to launch]) to the controller buttons using GlovePie, I can execute the command to launch in the northeast without any problems.

As for your questions, I don’t know exactly why programs respond differently to keyboard input, but maybe how they detect your input. For example: a Java-based game can detect DirectInput (a signature sent from your input / output devices), while an emulator (for example, a SNES ZSNES emulator for a PC) can only detect an instance of the Up key used. Another input emulation program, AutoHotkey, cannot control a java game because it does not use the same input form that the game defines (it does not use Java DirectInput).

So, to get more keys, I would use a USB controller running GlovePie.

A quote from another forum: β€œThis is not a problem (technically). The solution is quite simple, but it increases the cost of the keyboard. Consider this simple task: you have 64 keys. How many wires do you need if you want to distinguish all possible simultaneous keys Answer: 65, One common and one for each key. However, if you arrange the keys in an array with 8x8 keys, you only need 16 wires, 8 for columns and 8. For rows, this reduces the number of contacts of the keyboard controller chip and makes the keyboard much cheaper to produce. clav Aturi that I have ever seen, are that way. "

+5
source share

A quote from another forum is completely wrong ...

Keyboards always use a matrix, and the 8x8 layout on the key membrane / micro switch will cover 64 keys. Sending power along a common row and picking up which column (if any) was connected to one at a time - it just scans very quickly. The controller chip can easily determine how many keys are pressed at a time at will (including all), without any performance improvement (it should poll each key in any case, up or down).

This information is then serialized by the keyboard to tell the host what events have occurred (limiting factors are the design of chip # 1 and the amount of traffic that it wants to host on bus number 2). They are converted to the corresponding OS events by drivers (limiting factor No. 3). Then these events are processed by applications, which, in turn, can have their own restrictions on the number of keys that they track (No. 4).

There is a lot going on, but they have not used 1 wire per key + ground since the 60s. And if you do not think that the matrix can scan fast enough - look at any lcd / led screen, which happens in the same matrix, just the opposite.

+7
source share

I found a good article. Keyboard explanation explained! , which explained everything I needed to know on this issue. And it has a test area, so I can find which key combinations on my laptop do not play together beautifully.

+4
source share

All Articles