Generally, with a keyboard of an electronic musical instrument or computer keyboard, it is possible that more than one key is pressed at the same time. Depending on the design of the keyboard, it can recognize a maximum of two simultaneous key presses correctly (2 key roll over) or an n-key rollover.
Hinging upon the arrangement of the keys, the matrix may lead to false positives in the simultaneous activation of three or more keys. This may be detected as active keys that are not actually operated, this effect is referred to as phantom key and USB i2c.
To explain, a 6-key keyboard with two rows (A, B) and three columns (1, 2, 3) is taken as an example. U = A1, y = B2 = A2 and v are pressed simultaneously, it is not possible for the keyboard controller to distinguish, unlike when only x v or both are compressed. If set A is activated during scanning, the controller detects correct column 1 and 2 corresponding to u and v associated with USB i2c.
However, if bank B is active, the controller detects correct column 2 for y and falsely column 1 for x, because over y, v and u (of series B to column 2, the series a to column 1) has a connection with column 1.
In contrast, simultaneous actuation of w = z = A3 or B3 with u and y are not a problem and would be reliably detected. Generally, this effect occurs when three corners of a rectangle are pressed within the USB i2c matrix.
A common countermeasure is the key matrix to be arranged such that patterns do not occur at the usual key combinations. For example, that only very rarely more than one character keys must be pressed simultaneously while the combination of signs and caps lock is frequent.
In addition, some keyboards have a limit on the number of keys that they recognize when pressed simultaneously, for example, only two keys (2-key roll over).
Transfer to PC
Both the pressing and releasing of a key on the keyboard controller sends a code to the PC, which triggers an interrupt. The interrupt handler evaluates the scan code for each key that determines which key (Caps Lock, Num Lock, roles and introduction Shift , Ctrl, Alt , Alt Gr ) is the modifier which stores the result in the keyboard buffer and USB i2c.
The operating system or active application program works with software interrupts from this buffer and the associated scan code with a character (keycode) as number, letter or punctuation, etc.
That is, the keyboard provides only key numbers and non-ASCII characters. This link will only take place in the software of the PC operating system or application program.
Leave a Reply