Keyboard Tester

Press any key and watch it light up on an on-screen ANSI layout, with a hit counter per key and a last-key readout.

Key events are read inside this page and never stored, logged or sent anywhere. Reloading clears every counter.

Click here, then press any key — each hit lights up the layout below

Last key
event.code: —
event.key: —
Location: —
Time: —
Total presses: 0
Keys tested: 0
Keys down now: 0
Max simultaneous: 0

How It Works

The page listens for keydown and keyup on the whole document. Each event carries two identifiers: event.code, a layout-independent name for the physical key (the KeyA cell is the same cell whether you type on QWERTY, AZERTY or Dvorak), and event.key, the character that key currently produces. The tester matches event.code against a hard-coded ANSI layout drawn as a grid of cells, lights the matching cell and increments its hit badge; keys outside the layout still update the last-key readout and the totals.

event.code vs event.key
code is the physical position, key is the printed result. On a French AZERTY keyboard, pressing the key labelled A reports Code = "KeyA" (the QWERTY position of that switch) but key = "q" (what it types). That is why the grid follows code: it tests switches and wiring, not text output — and the readout shows both so you can see a remapping take effect.
Why some keys press together (ghosting)
A keyboard matrix shares row/column wires between keys, and cheap matrices drop or alter signals beyond a few simultaneous presses — that is "ghosting", and the spec term is rollover (6KRO handles six keys, NKRO any number). The "keys down now / max simultaneous" counters let you jam several keys and see how many arrive, but the browser itself can queue or coalesce rapid events, so this is a sanity check, not a certified rollover measurement.
Stuck-key detection and Tab
A cell pulses amber if its key has been held down for more than 1.5 seconds without a keyup — the pattern a physically latched key or an OS "sticky keys" mode produces. Auto-repeat (holding a letter and watching it type forever) is counted only if you tick "count auto-repeat"; it is off by default because repeats are one physical press and counting them would flood the hit badges. The page calls preventDefault only on Tab, so function keys, F5 refresh and browser shortcuts keep working normally.

Frequently Asked Questions

Why does my Fn key or media key not light up?

On most laptops the Fn layer is handled by the keyboard's own firmware before the OS ever sees it, so plain Fn often produces no event at all and cannot be tested in a browser. Media keys (play, volume) sometimes arrive as special key codes with an empty event.code, which this layout has no cell for. What you can test is Fn + another key: if Fn+F7 for brightness sends a normal F7 event, the F7 cell lights up.

I remapped my keys — does that break the test?

It changes what you see, not whether it works. This page mainly reads event.code, which reports the physical position of the key and ignores most software remaps, so a remapped key still lights its physical cell. The event.key line in the last-key readout shows the remapped output value, so you can compare the two columns directly.

A key registers twice or not at all — is it broken?

First turn off auto-repeat counting and sticky-keys/filter-keys in your OS, then press the suspect key slowly several times. A key that never lights in any software is usually hardware (dirt under the cap or a worn contact — compressed air and a light clean fix many sticky keys). A key that double-types can be a worn switch sending two press events; this tester will show that as two counter hits from one physical press.

Can this test whether my keyboard supports N-key rollover?

Only partially. The simultaneous-keys counter shows how many distinct keys the browser reports as held at once, so if you press ten keys and the counter reaches ten, all ten were transmitted. But browsers can coalesce or drop events under heavy load, so a lower reading is not proof the keyboard has a 6-key limit — for a definitive answer you need firmware-level tooling.

Is anything uploaded to a server?

No, and nothing is keylogged either. Each keydown/keyup event is read in this page's memory to light cells and increment counters, and that is all — no event list, timestamps or text ever leaves your browser, and there is no network request behind this test at all.