Device & Hardware
Keyboard Test
Press keys and watch them light up. The map shows the code and location your browser reports for each key.
Keyboard inspector
- Key events
- 0
- Distinct keys
- 0
- Keys down now
- 0
- Key-up events
- 0
Hold several keys at once to see how many the browser reports.
Waiting for input
This test runs entirely in your browser. Nothing is uploaded or stored on a server.
What this page reads
Every key press in a browser produces an event with several properties. The physical position is reported as code, the produced character or action as key, and a legacy numeric identifier as keyCode. The test displays all three, plus the repeat flag and the location that tells apart keys sharing a name.
The event counters are equally useful. Key events counts every keydown, including the automatic repeats that start when a key is held. Distinct keys counts how many different codes have appeared, and Keys down now shows how many presses are currently held without a matching key-up. A key that increments the down counter but never decrements it is a key whose release event is being lost, which is often a stuck modifier or a focus change.
Reading the map
The layout map is a QWERTY reference, not a picture of your keyboard. When the browser reports a code, the matching position lights up. If you press the key printed as A but a different position lights up, the operating system is sending a remapped code. If nothing lights up at all, the event never reached the page.
Where the reading stops
A browser cannot tell whether a switch is worn, whether a membrane is dirty or whether a keyboard controller is dropping scans. It only knows which events arrived. Rollover, the number of keys a keyboard can report at once, depends on the hardware and on the operating system, so the counter here is a lower bound. For a suspected hardware fault, compare the same key in a text editor, in the browser and, if possible, on a second computer.
If you are checking the other half of your input setup, the mouse test reports buttons, wheel steps and double-click gaps in the same event-driven way. For keys that only fail in games, the CPS test shows whether rapid presses are being merged before the page sees them.
Modifiers and shortcuts
Modifier keys deserve their own pass. Press each Shift, Ctrl, Alt and Meta key separately and read the location value: the left and right versions share a code but carry different locations, and a stuck modifier shows up as a key that stays in the down counter after release.
Some combinations never reach the page because the browser or the operating system claims them first. Ctrl and W, Ctrl and T, Alt and Tab and the Windows key are common examples. If a shortcut works in one browser and not another, test its individual keys here before blaming the keyboard; a key that reports normally on its own is not the missing part.
On layouts with AltGr, the right Alt key may report as Control plus Alt. That is the operating system composing a character rather than a fault. Typing a symbol that needs AltGr and watching the key card is the quickest way to confirm the behaviour.
Layout versus hardware
Switching the operating system layout changes the key value while the code stays the same. If a shortcut breaks after a layout change, test both layouts and compare the code column; a stable code with a different key proves that the hardware is reporting the same position and the layout is rewriting the character.
How to use this test
-
Focus the page
Click once inside the test area so the page has focus, then press the key you want to inspect.
-
Read the key card
The card shows the code, the key value, the numeric keyCode and the location for the last press.
-
Watch the layout map
The matching key on the map lights up, which confirms which physical position the browser reported.
-
Test several keys at once
Hold two or more keys together and watch Keys down now to see how many presses the browser keeps apart.
-
Clear the counters
Press Reset test before a second check so the event counts start from zero.
How to read the numbers
| Signal | Typical reading | How to read it |
|---|---|---|
| event.code | KeyA, Digit1, Space | The physical key position. It does not change with the keyboard layout. |
| event.key | a, 1, Space, Enter | The printed value after the active layout is applied. |
| Location | Standard, Left, Right, Numpad | Tells the two Shift keys, Ctrl keys and the numeric keypad apart. |
| Repeat | No, then Yes | A held key starts repeating after the system delay. |
| Rollover | 3 to 6 keys typical | The operating system and keyboard limit how many keys the browser sees at once. |
Browser support
| Browser | Support | Notes |
|---|---|---|
| Chrome and Edge | Supported | Current desktop versions. |
| Firefox | Supported | Current desktop versions. |
| Safari | Supported | Safari 16 or later recommended. |
| Mobile browsers | Supported | Chrome on Android and Safari on iOS 16 or later. |
Tips
- Test the suspect key in another application first; if it fails there too, the browser is not the cause.
- Function-row keys may send media commands instead of F1 to F12, depending on the Fn setting of the keyboard.
- On a laptop, an external keyboard is the quickest way to separate a faulty key from a faulty ribbon cable.
Frequently asked questions
Why does a key show a different character than the one printed on it?
The key value follows the active keyboard layout, while the code follows the physical position. A layout change or a remapped key explains the difference.
What does location mean?
Location separates keys that share a code, such as the left and right Shift keys or the numeric keypad Enter. A value of 0 is the standard position, 1 is left, 2 is right and 3 is the numeric keypad.
Why is keyCode shown when it is deprecated?
Older scripts and games still read keyCode, so it is reported for comparison. New code should use the code and key values instead.
The test sees nothing when I press a key. What now?
Check that the page has focus and that no other window has captured the keyboard. Some system shortcuts are consumed by the operating system before any page sees them.