How to use the keyboard tester
- Click once anywhere on this page so the browser sends key events here.
- Press every key in turn. A key turns blue while held and stays green once it has been registered at least once.
- Work through the whole board. Anything still grey at the end either was not pressed, or is not responding.
- Press Reset to clear the highlights and start again.
The layout above is a full-size US keyboard. If yours is a laptop or a compact model, some keys simply will not exist — a tenkeyless keyboard has no numeric keypad, and most laptops have no dedicated Scroll Lock or Pause. Ignore those and concentrate on the keys you actually have.
Reading the key codes
The four values under the keyboard describe the last key you pressed:
- event.key — the character produced, which depends on your keyboard layout and on whether Shift is held.
- event.code — the physical key position, independent of layout. This is what the highlighting uses, and it is why the tester works with any language.
- keyCode — the legacy numeric code, kept for compatibility with older software.
- Location — distinguishes duplicated keys: 1 is the left Shift, Ctrl or Alt, 2 is the right one, and 3 means the numeric keypad.
If event.key disagrees with the letter printed on the keycap, your operating system is set to a different keyboard layout than the hardware. That is a settings problem, not a broken keyboard.
Keys that cannot be tested in a browser
A few keys never reach the page, and their absence does not mean they are broken:
- Fn — processed inside the keyboard itself. No application on any operating system can see it.
- Media and brightness keys — usually intercepted by the operating system before the browser gets a chance.
- Print Screen — captured by the screenshot tool on many systems, so the browser sees only the release.
- The Windows or Command key — opens the system menu and takes focus away from the page.
Diagnosing common keyboard faults
A key does nothing at all
First rule out software: try the key in a plain text editor as well. If it is dead everywhere, and other keys work, the switch or the membrane under that key has failed. Before assuming the worst, remove the keycap if you can and check for debris — on membrane keyboards a single crumb is enough to break contact.
A key repeats or fires on its own
This is switch chatter, usually caused by dirt or by a worn contact. Clean first with compressed air and isopropyl alcohol on a cotton bud. On a hot-swap mechanical keyboard the switch can be replaced in seconds; on a soldered board or a laptop it is a repair job.
Several keys fail together
Keys that fail in a group — a whole row, or a diagonal set — point at the matrix wiring or a ribbon cable rather than individual switches. On a laptop this is often a partially seated or corroded keyboard ribbon connector, which is a common outcome after a liquid spill.
Nothing works at all
Try the keyboard on another computer, and try another keyboard on this one. That single swap tells you immediately whether the fault is the keyboard, the port or the driver. For wireless models, replace the batteries before anything else — falling voltage causes erratic behaviour long before the keyboard stops completely.