Keyboard Ghosting Test: Check N-Key Rollover and Blocked Keys
This keyboard ghosting test shows which keys your keyboard reports when you hold several at once. Hold down a combination you use, such as W, A and Shift in a game, and every key should turn red. A key that does not turn red while you hold it was not reported.
- Keys held now
- 0
- Most at once
- 0
- Keys tested
- 0
Held: nothing
Most at once: nothing yet
Keys light red while held and stay grey once tested. If a key you are holding does not light up, it was ghosted: your browser did not receive it. Press Esc to stop the test.
How to use the keyboard ghosting test
- Select Start test, or click the keyboard. The test only reads keys while it has focus.
- Hold down the keys you want to check together. Each one lights red while held and turns grey once tested.
- Watch Keys held now. If you are holding five keys and it says four, one key was not reported. The Held line names the keys that did arrive.
- Most at once keeps the biggest combination that worked, so you can see how many keys your keyboard handled together.
- Press Esc, or click outside the keyboard, to stop the test.
Avoid holding Ctrl with W, T or N. If a key is held when the tab starts to close, the test asks the browser to confirm first. Full screen also asks the browser to pass shortcuts to the test using the Keyboard Lock API, which MDN lists in Chrome and Edge but not in Firefox or Safari.
What keyboard ghosting is
Microsoft's Applied Sciences group describes ghosting as the problem that some keys don't work when several keys are pressed at the same time. Keystrokes that don't show up on the computer are said to be "ghosted". In its explainer, Keyboard ghosting and the SideWinder X4, Microsoft says this happens with many three-key combinations on most keyboards, even some sold as "Anti-Ghosting".
Microsoft's example is a game where you cannot run diagonally and fire at the same time. It notes that a player might think they had not hit the key fast enough, rather than that the key was never reported.
Why keyboards ghost
Microsoft lists three causes:
- The keyboard hardware cannot read that combination of keys.
- The software on the computer does not support that many keys at once.
- The communication protocol between the keyboard and the computer limits how many keys can be reported.
Most keyboards have a grid of row and column wires under the keys, and a key press connects one row to one column. With one or two keys down, the pattern of connections points to exactly which keys they are. With three keys that share rows and columns, several different sets of keys can make the same pattern. When the pattern is ambiguous, Microsoft says, a typical keyboard stops reporting new keys rather than report the wrong ones. Those are the ghosted keys.
There is also a limit in how keys are sent. Microsoft notes that the standard reporting protocol limits the number of keys held at once to six, plus modifiers such as Shift, Ctrl and Alt. Some keyboards get past this with their own reporting method, which Microsoft says may not work properly before the operating system loads, for example while the computer is booting.
How to find ghosted keys
Microsoft's ghosting demo page gives a quick method that works on this test too:
- Hold down A, S, D and W, the most popular keys for moving around in games.
- While holding them, press every other key in turn and check that each one lights up.
- If a key does not light up, try releasing some of A, S, D and W. Microsoft says the odds are high that you will find a three-key combination that fails.
Then test the combinations you really use, such as your game's movement keys with Shift, Space, Ctrl and the keys for reloading or using items. Microsoft notes that one set of six keys working does not mean every set of six works. It also says the simplest keyboard design has thousands of three-key combinations that fail, although that is still under 5% of all three-key combinations.
Anti-ghosting and N-key rollover claims
Some keyboards are sold as "N-key rollover" (NKRO) or "Anti-Ghosting". Microsoft warns that "Anti-Ghosting" on the box may only mean that a particular set of keys works well together. A claim of "up to" a large number of keys can also be true even if only one combination of that size works, while many three-key combinations still ghost. Microsoft's advice is to try the combinations your own apps and games use, which you can do on this test.
Microsoft describes keyboards built with a diode at every key so that each key can be detected on its own, an approach it calls relatively expensive.
Keys the test cannot see
- Print Screen: Microsoft notes that browsers on Windows generally cannot detect when it is pressed. The test marks it as tested if your browser reports it when you let go.
- Windows key: it opens the Start menu and takes focus away from the page. Click the keyboard to carry on.
- Fn: MDN's table of key codes notes that the Fn key fires no events on a Mac, so the test does not draw it.
- Esc: it stops the test, so it is not useful in a combination.
- Media and extra keys: they are not drawn, but if your browser receives them they still count, and their names appear in the Held line.
Other layouts and Mac keyboards
The picture is a US layout, but the test reads where each key physically sits. MDN explains that a key's code does not change with the keyboard layout: the key that types Q on a QWERTY keyboard reports as KeyQ, and on an AZERTY keyboard that same key types A. So on an AZERTY keyboard, pressing A lights the Q position. On a Mac, Command lights the Win key and Option lights Alt.
FAQ
Is ghosting the same as a broken key?
No. A ghosted key works on its own and only fails in some combinations. If a key never lights up, even when you press it alone, and it is not one of the keys listed above, the key itself may be faulty.
Does it work on a laptop keyboard?
Yes. Any keyboard that types into your browser works, including laptop and Bluetooth keyboards.
Does it work on a phone or tablet?
It needs a physical keyboard. On a tablet, connect one first.
Can I test my mouse too?
Yes. The mouse double click test checks the left, right, middle, back and forward buttons for clicks that register twice, and the mouse DPI analyzer measures your real DPI.
Is anything sent or saved?
No. The test runs in your browser and only reads which keys are down while it has focus.
