Key rollover

Last updated

Key rollover is the ability of a computer keyboard to correctly handle several simultaneous keystrokes. A keyboard with n-key rollover (NKRO) can correctly detect input from each key on the keyboard at the same time, regardless of how many other keys are also being pressed. Keyboards that lack full rollover will register an incorrect keystroke when certain combinations of keys are pressed simultaneously. Rollover has applications for stenotype, electronic music keyboards, gaming, and touch-typing generally.

Contents

Keyboard usage

It is common for a person playing a PC game to simultaneously hold down multiple keys. Such as: "Left Shift" for sprinting, "W" for moving forward, and "Space" for jumping. Computer Keyboard Simultaneous Keys Above.jpg
It is common for a person playing a PC game to simultaneously hold down multiple keys. Such as: "Left Shift" for sprinting, "W" for moving forward, and "Space" for jumping.

During normal typing on a conventional computer keyboard, only one key is usually pressed at any given time, then released before the next key is pressed. However, this is not always the case. When using modifier keys such as Shift or Control, the user intentionally holds the modifier key(s) while pressing and releasing another key. Rapid typists may also sometimes inadvertently press a key before releasing the previous one.

Certain unusual forms of keyboarding require multiple keys to be pressed or held down simultaneously;
for example:

n-key rollover

Certain high-end keyboards have n-key rollover (NKRO). This means that each key is scanned completely independently by the keyboard hardware, so that each keypress is correctly detected regardless of how many other keys are being pressed or held down at the time. [3] Full n-key rollover is required for stenotype, which relies on chording to input text far faster than conventional typing methods, allowing it to keep pace with the speed of human speech.

Most music keyboards use isolation diodes in their keyboard matrix to implement full n-key rollover, making them immune to both key ghosting and key jamming. [4]

For the user to get the benefit of the full n-key rollover, the complete key press status must be transmitted to the computer. When the data is sent via the USB protocol, there are two operating modes: Human Interface Device (HID) "report protocol" and "boot protocol". The (optional) boot protocol, which is solely used by very limited USB host implementations such as BIOS, is limited to eight modifier keys (left and right versions of Ctrl, Shift, Alt, and Win), followed by maximum six key codes. This will limit the number of simultaneous key presses that can be reported. The (mandatory) HID report protocol, which is what operating systems use, imposes no restrictions and supports full n-key rollover. The HID specification however imposes no requirements on rollover and low-end keyboards may impose the same restrictions regardless of whether the boot protocol or the HID report protocol is used.

Multi-key rollover

However, to reduce cost and design complexity, most computer keyboards do not isolate all keys in this way. Instead, they use a matrix of key switches, without any isolation diodes, that assumes that only a limited number of keys will be held down at any given time. With these keyboards, pressing as few as three keys can cause ghosting effects, [4] although care is taken when laying out the matrix arrangement that this does not happen for common modifier key combinations.

A keyboard with "two-key rollover" can reliably detect only any two keys used simultaneously; in other words, a user can hold down any key on the keyboard and press a second key, and be sure that the keypress is correctly detected by the computer. However, if the user has two keys depressed and attempts to strike a third key, the third keypress may create a "phantom key" by shorting out the switch matrix. This is not acceptable for quality keyboards because there are many cases when more than two keys need to be depressed at the same time, such as Ctrl-Alt-Delete, or when more than two keys are depressed because of fast typing ("rolling over" more than two keys).

"Multi-key rollover" is considered essential for quality keyboards and for English-language touch typing. This is where the most common key sequences have been studied[ citation needed ], and keys in the same common sequence are placed in the electrical switch matrix such that three keys down cannot produce a fourth "phantom" key by shorting out the matrix. The simplest way to accomplish this is to put all keys in the same common sequence on the same X or Y line of the switch matrix. As long as the electronics do not see more than two keys on different X and Y lines, which would create a phantom key, it will continue to process the next key depressed. This typically produces four- to five-key rollover for the most common key sequences.

Key jamming and ghosting

"Ghosting" can occur when certain combinations of three keys are pressed simultaneously. Keypad6c.png
"Ghosting" can occur when certain combinations of three keys are pressed simultaneously.

Key ghosting occurs on matrix keyboards for certain combinations of three keys. The image to the right illustrates the problem.

This example shows that three keys, brown, blue and green, have been pressed. A signal path is accurately detected from terminal 1, through the brown switch to terminal 6, indicating that key 1/6 has been pressed. However, the signal also routes through the blue and green switches to terminal 4, falsely indicating that key 1/4 has been pressed. This error is called ghosting, as a phantom keypress (1/4) has been detected. This only occurs when three corners of a rectangular set of switches are closed—the "ghost" being the fourth corner. When these three keys are pressed simultaneously, this fourth keypress is erroneously registered by the keyboard controller.

If necessary, these errors can be eliminated by placing a diode in series with each key switch, as shown in Figure B. In this example, the false signal path is blocked by the diode in series with the blue switch. [4]

Modern keyboards detect ghosting, and instead of registering a fourth key, they will ignore the third key. This behavior is known as jamming, as the first two keys jam the third. Which keys jam when pressed together differs between brands and models of keyboards.

Most music keyboards and some high-end computer keyboards use an isolation diode with each keyswitch in their matrix, and can correctly read any combination (chording) of keys pressed in any order and released in any order—they are immune to both key ghosting and key jamming. [4] Some "gaming keyboards" use a matrix, but only give individual diodes to the most frequently-used keys in gaming such as WASD and the arrow keys.

Key jamming is often noticed when using a keyboard to play computer games where many keypresses combine to movement vectors and other simultaneous activities rather than typing text. The original Star Control game included a utility to test for key jamming and help the player to determine the best key mapping for their keyboard, since during gameplay it was common for each of the two players to be pressing three or four keys at the same time.

Many computer games and console emulators use the control, alt, and shift keys by default. Computer keyboards typically are designed to detect these keys being activated in addition to others from the character matrix, and this may prevent key jamming.

See also

Related Research Articles

<span class="mw-page-title-main">Keyboard technology</span> Hardware technology of keyboards

The technology of computer keyboards includes many elements. Many different keyboard technologies have been developed for consumer demands and optimized for industrial applications. The standard full-size (100%) computer alphanumeric keyboard typically uses 101 to 105 keys; keyboards integrated in laptop computers are typically less comprehensive.

In computing, a modifier key is a special key on a computer keyboard that temporarily modifies the normal action of another key when pressed together. By themselves, modifier keys usually do nothing; that is, pressing any of the ⇧ Shift, Alt, or Ctrl keys alone does not (generally) trigger any action from the computer. They are commonly used in defined sequences of keys with another keys to trigger a specific action. These sequences are called keyboard shortcuts.

<span class="mw-page-title-main">Control key</span> Key on computer keyboards

In computing, a Control keyCtrl is a modifier key which, when pressed in conjunction with another key, performs a special operation. Similarly to the Shift key, the Control key rarely performs any function when pressed by itself. The Control key is located on or near the bottom left side of most keyboards, with many featuring an additional one at the bottom right.

A dead key is a special kind of modifier key on a mechanical typewriter, or computer keyboard, that is typically used to attach a specific diacritic to a base letter. The dead key does not generate a (complete) character by itself, but modifies the character generated by the key struck immediately after. Thus, a dedicated key is not needed for each possible combination of a diacritic and a letter, but rather only one dead key for each diacritic is needed, in addition to the normal base letter keys.

<span class="mw-page-title-main">Keyboard shortcut</span> Assignments for computer keyboard keys

In computing, a keyboard shortcut is a software-based assignment of an action to one or more keys on a computer keyboard. Most operating systems and applications come with a default set of keyboard shortcuts, some of which may be modified by the user in the settings.

<span class="mw-page-title-main">Stenotype</span> Specialized typewriter or chorded keyboard for recording in shorthand

A steno machine, stenotype machine, shorthand machine, stenograph or steno writer is a specialized chorded keyboard or typewriter used by stenographers for shorthand use. In order to pass the United States Registered Professional Reporter test, a trained court reporter or closed captioner must write speeds of approximately 180, 200, and 225 words per minute (wpm) at very high accuracy in the categories of literary, jury charge, and testimony, respectively. Some stenographers can reach up to 375 words per minute, according to the website of the California Official Court Reporters Association (COCRA).

<span class="mw-page-title-main">Shift key</span> Key on typewriter or computer keyboard

The Shift key⇧ Shift is a modifier key on a keyboard, used to type capital letters and other alternate "upper" characters. There are typically two Shift keys, on the left and right sides of the row below the home row. The Shift key's name originated from the typewriter, where one had to press and hold the button to shift up the case stamp to change to capital letters; the Shift key was first used in the Remington No. 2 Type-Writer of 1878; the No. 1 model was capital-only. On the US layout and similar keyboard layouts, characters that typically require the use of the Shift key include the parentheses, the question mark, the exclamation point, and the colon.

<span class="mw-page-title-main">Caps Lock</span> Computer key

Caps Lock⇪ Caps Lock is a button on a computer keyboard that causes all letters of bicameral scripts to be generated in capital letters. It is a toggle key: each press reverses the previous action. Some keyboards also implement a light to give visual feedback about whether it is on or off. Exactly what Caps Lock does depends on the keyboard hardware, the operating system, the device driver, and the keyboard layout. Usually, the effect is limited to letter keys. Letters of non-bicameral scripts and non-letter characters are generated normally.

<span class="mw-page-title-main">Alt key</span> Computer key

The Alt keyAlt on a computer keyboard is used to change (alternate) the function of other pressed keys. Thus, the Alt key is a modifier key, used in a similar fashion to the Shift key. For example, simply pressing A will type the letter 'a', but holding down the Alt key while pressing A will cause the computer to perform an Alt+A function, which varies from program to program. The international standard ISO/IEC 9995-2 calls it Alternate key. The key is located on either side of the space bar, but in non-US PC keyboard layouts, rather than a second Alt key, there is an 'Alt Gr' key to the right of the space bar. Both placements are in accordance with ISO/IEC 9995-2. With some keyboard mappings, the right Alt key can be reconfigured to function as an AltGr key although not engraved as such.

<span class="mw-page-title-main">Option key</span> Modifier key present on Apple keyboards

The Option key, , is a modifier key present on Apple keyboards. It is located between the Control key and the Command key on a typical Mac keyboard. There are two Option keys on modern Mac desktop and notebook keyboards, one on each side of the space bar.

In user interface design, a mode is a distinct setting within a computer program or any physical machine interface, in which the same user input will produce perceived results different from those that it would in other settings. Modal interface components include the Caps lock and Insert keys on the standard computer keyboard, both of which typically put the user's typing into a different mode after being pressed, then return it to the regular mode after being re-pressed.

<span class="mw-page-title-main">Keypad</span> Input device

A keypad is a block or pad of buttons set with an arrangement of digits, symbols, or alphabetical letters. Pads mostly containing numbers and used with computers are numeric keypads. Keypads are found on devices which require mainly numeric input such as calculators, television remotes, push-button telephones, vending machines, ATMs, point of sale terminals, combination locks, safes, and digital door locks. Many devices follow the E.161 standard for their arrangement.

<span class="mw-page-title-main">PS/2 port</span> 6-pin mini-DIN connector for connecting keyboards and mice to a PC compatible computer

The PS/2 port is a 6-pin mini-DIN connector used for connecting keyboards and mice to a PC compatible computer system. Its name comes from the IBM Personal System/2 series of personal computers, with which it was introduced in 1987. The PS/2 mouse connector generally replaced the older DE-9 RS-232 "serial mouse" connector, while the PS/2 keyboard connector replaced the larger 5-pin/180° DIN connector used in the IBM PC/AT design. The PS/2 keyboard port is electrically and logically identical to the IBM AT keyboard port, differing only in the type of electrical connector used. The PS/2 platform introduced a second port with the same design as the keyboard port for use to connect a mouse; thus the PS/2-style keyboard and mouse interfaces are electrically similar and employ the same communication protocol. However, unlike the otherwise similar Apple Desktop Bus connector used by Apple, a given system's keyboard and mouse port may not be interchangeable since the two devices use different sets of commands and the device drivers generally are hard-coded to communicate with each device at the address of the port that is conventionally assigned to that device.

<span class="mw-page-title-main">Microwriter</span> Hand-held portable word-processor with a chording keyboard

The Microwriter is a hand-held portable word-processor with a chording keyboard. First demonstrated in 1978, it was invented by UK-based, US-born film director Cy Endfield and his partner Chris Rainey and was marketed in the early 1980s by Microwriter Ltd, of Mitcham, Surrey, UK. By using a mnemonic alphabet, its manufacturers stated it allowed note-taking of up to 8,000 characters at an input rate averaging 1.5 times that of handwriting.

<span class="mw-page-title-main">Gateway AnyKey</span> Programmable PC keyboard

The Gateway AnyKey is a programmable computer keyboard that was sold exclusively by Gateway 2000, Inc., as an option for some of their desktop computers. Introduced in the spring of 1991, the keyboard was manufactured in at least five known versions and incarnations by Tucson, Arizona–based Maxi Switch, Inc., a subsidiary of the Lite-On Technology Corporation. It was also sold by Maxi Switch themselves, as the ProKey II. The AnyKey proved popular, especially among power users and computer programmers, and soon gained a cult following. The AnyKey is no longer manufactured, Gateway having discontinued it by 1998 at the latest.

In computing, the USB human interface device class is a part of the USB specification for computer peripherals: it specifies a device class for human interface devices such as keyboards, mice, touchscreen, game controllers and alphanumeric display devices.

A keyboard matrix circuit is a design used in most electronic musical keyboards and computer keyboards in which the key switches are connected by a grid of wires, similar to a diode matrix. For example, 16 wires arranged in 8 rows and 8 columns can connect 64 keys—sufficient for a full five octaves of range. By scanning these crossings, a keyboard controller can determine which keys are currently pressed.

<span class="mw-page-title-main">Computer keyboard</span> Data input device

A computer keyboard is a peripheral input device modeled after the typewriter keyboard which uses an arrangement of buttons or keys to act as mechanical levers or electronic switches. Replacing early punched cards and paper tape technology, interaction via teleprinter-style keyboards have been the main input method for computers since the 1970s, supplemented by the computer mouse since the 1980s.

<span class="mw-page-title-main">Keyboard layout</span> Arrangement of keys on a typographic keyboard

A keyboard layout is any specific physical, visual, or functional arrangement of the keys, legends, or key-meaning associations (respectively) of a computer keyboard, mobile phone, or other computer-controlled typographic keyboard.

<span class="mw-page-title-main">Intel 8279</span>

The Intel 8279 is a keyboard and display controller developed for interfacing to Intel 8085, 8086 and 8088 microprocessors. The industrial version of ID8279 was available for USD $30.70 in quantities of 100. Its important features are:

References

  1. "Braille2000: Keyboard Requirements" . Retrieved 2006-07-19.
  2. "Looking for a new keyboard?". 2004-10-26. Archived from the original on 2007-09-28. Retrieved 2006-07-19.
  3. "TechEncyclopedia: n-key rollover" . Retrieved 2011-12-03. mirror: "TechEncyclopedia: n-key rollover". Archived from the original on September 27, 2007. Retrieved 2007-09-27.
  4. 1 2 3 4 Dribin, Dave. "Keyboard Matrix Help, section 8: "Getting Rid Of Ghosting and Masking"" . Retrieved 2008-10-11.