Keyboard Ghosting and N-Key Rollover Explained

Keyboard ghosting is when a key you press does not register because you are already holding other keys down. In a game it can mean you cannot run diagonally and jump at the same time. This guide explains why keyboard ghosting happens, what N-key rollover and 6-key rollover mean, how to run a keyboard ghosting test yourself, and what “anti-ghosting” on the box really promises.

What is keyboard ghosting?

Microsoft, which studied the problem when designing its SideWinder X4 keyboard, describes ghosting as “the problem that some keyboard keys don’t work when multiple keys are pressed simultaneously”. Its example will be familiar to gamers: not being able to run diagonally and fire at the same time, for instance pressing A, W and G together.

The terms are used loosely. Strictly speaking there are two different faults:

FaultWhat happens
GhostingThe keyboard reports an extra key you did not press
Jamming (blocking)The keyboard ignores a key you did press

Wikipedia explains that modern keyboards detect the conditions that would create a phantom key and, instead of reporting it, ignore the third key. That is jamming, but most people, and most keyboard boxes, call it ghosting.

Why keyboards ghost

Most keyboards do not wire each key separately. Microsoft describes the common design: sheets printed with a grid of row and column wires under the keys, where a key press connects one row to one column. The keyboard works out which key you pressed from that connection.

With two keys held, there is no confusion. With three keys at three corners of a rectangle in the grid, electricity can also flow through a fourth corner, and the keyboard cannot tell whether that fourth key is pressed. Microsoft says the typical keyboard then “stops reporting new keystrokes to avoid reporting the wrong keys”.

The fix is a diode at every key, so current can only flow one way. Microsoft notes that this needs a circuit board with over a hundred diodes, which “is relatively expensive”. Cheaper keyboards rearrange the wiring so that common game combinations work, but as Microsoft puts it, that only moves the problem “to other sets of keys, where the user is less likely to notice”.

The three causes

Microsoft lists three places where simultaneous keys can be lost:

  1. The keyboard’s electronics cannot tell which keys are pressed.
  2. The connection between keyboard and computer limits how many keys can be reported.
  3. Software on the computer does not handle many simultaneous keys, even when the keyboard reports them correctly.

N-key rollover and 6-key rollover

Rollover describes how many keys a keyboard can register at once.

  • 2-key rollover: any two keys work together, but a third may fail.
  • 6-key rollover (6KRO): up to six regular keys plus the modifier keys.
  • N-key rollover (NKRO): Wikipedia defines it as a keyboard that “can correctly detect input from each key on the keyboard at the same time, regardless of how many other keys are also being pressed.”

Where the six key limit comes from

USB keyboards can talk to a computer in two ways. Wikipedia explains that the simple boot protocol, used by things like a computer’s BIOS, is limited to the eight modifier keys plus a maximum of six key codes. Operating systems use the fuller report protocol, which “imposes no restrictions and supports full n-key rollover”. The catch is that the specification does not require a keyboard to support more, so some low-end keyboards keep the six key limit anyway.

Some makers still state a six key limit for their USB keyboards, so check the specification of your model. Microsoft also notes that keyboards which use their own reporting method to go beyond six keys may not work fully before the operating system loads, for example in the BIOS.

Is “anti-ghosting” the same as NKRO?

Not necessarily. Microsoft warns that a keyboard marketed as anti-ghosting “may just refer to a particular subset of keys on the keyboard working well together”, and that claims of “up to” a large number of keys can hide many three-key combinations that fail. Wikipedia adds that some gaming keyboards only give their own diodes to the most used gaming keys, such as WASD and the arrow keys.

Switch type alone does not decide it either. Cherry says the individual switches of mechanical keyboards prevent ghosting, but rollover depends on how the keyboard is wired and how its controller reports keys. Check the rollover specification of the exact model rather than assuming. Our guide to mechanical vs membrane keyboards covers the other differences.

How to test keyboard ghosting

Microsoft’s own advice for finding problem combinations:

  1. Press and hold A, S, D and W, the usual movement keys in games.
  2. While holding them, press every other key in turn.
  3. If a key does not register, release some of the four keys and try again. You will often find a three-key combination that fails.

Microsoft also points out that finding one combination of six keys that works “does not necessarily mean that every combination of 6 works”. Test the combinations you actually use, such as movement plus jump, crouch and reload.

What a browser test can and cannot show

You can watch key presses register on any page that shows them, including Microsoft’s online keyboard ghosting demonstration. A browser only sees what the keyboard reported and what the operating system passed on, so some keys never reach a web page:

  • On Windows, browsers generally cannot detect the Print Screen key.
  • The Windows key moves focus to the Start menu.
  • MDN notes that on macOS, Caps Lock only sends a key down event, and macOS does not support Num Lock.
  • Screen readers can intercept key presses, so Microsoft suggests turning them off while testing.
  • Keys such as Fn are often handled inside the keyboard and may not show up at all.

To check speed rather than combinations, our KPS test counts how many keys you press per second.

What to do about ghosting

  • Change your key bindings. Move an action that fails onto a key outside the problem group.
  • Check for an NKRO or gaming mode. Some gaming keyboards let you switch between 6KRO and NKRO in their software or with a key combination. Check the manual for your model.
  • Try a different USB port or cable if a keyboard that should support NKRO behaves like 6KRO, and update the keyboard’s firmware or software.
  • Buy for the specification. If you play games that need many keys at once, look for full NKRO stated for the model, not just “anti-ghosting”.

Frequently asked questions

What is keyboard ghosting?

It is when a key press does not register, or a key you did not press appears, because several keys are held at once. It comes from the way most keyboards wire their keys in a shared grid.

What is the difference between ghosting and jamming?

Strictly, ghosting is a phantom extra key and jamming is a real key being ignored. Modern keyboards usually jam rather than ghost, but both are commonly called ghosting.

What does N-key rollover mean?

NKRO means the keyboard can register every key at the same time, however many are pressed. 6-key rollover means up to six regular keys plus the modifiers.

Does anti-ghosting mean NKRO?

Not always. Microsoft warns that anti-ghosting may only cover a set of keys working well together. Look for a stated rollover figure such as NKRO for the exact model.

How do I test my keyboard for ghosting?

Hold W, A, S and D, then press every other key in turn and watch which ones fail to register on a key display. Then test the exact combinations you use in your games.

Do all mechanical keyboards have NKRO?

No. Rollover depends on the keyboard’s wiring and controller, not only on the switches. Check the specification of the model.

Sources