About this keyboard tester
A small, dependency-free page for one job: showing you, in real time, exactly which physical key your browser thinks you just pressed — and how many you can hold at once before something drops.
Why it exists
"Is this key actually broken, or am I imagining it?" is a surprisingly hard question to answer just by typing into a text box — a dead key and a key that types the wrong character look identical from that angle, and a text box can't tell you how many keys you're holding at once. This tool separates the two questions cleanly: it shows the physical key position that changed state, independent of what character it types, and it keeps a running tally of simultaneous presses so a rollover claim can actually be checked rather than taken on faith.
How it's built
The on-screen keyboard is drawn from a plain data array — one entry per key, giving its event.code, its label, and its position on a unit grid — rather than 104 hand-placed HTML elements. That data lives in a separate file with a module.exports hatch specifically so it can be checked under Node without a browser: that the ANSI layout really does have 104 unique key codes and the ISO layout 105, that no two keys accidentally occupy the same physical position, and that every row lines up the way a real keyboard's does. The session logic — what counts as "held", what counts as "tested", the session-high "max held" figure — is pure functions operating on a plain object, tested the same way.
On top of that sits the part that actually touches the page: a keydown/keyup listener that reads event.code to decide which on-screen key to highlight, event.key/event.keyCode/event.location only for the live readout panel, and a small, explicit list of keys (Tab, Space, the arrows, Backspace, the F-keys) whose default browser action gets intercepted while the "Intercept keys" checkbox is on — skipped automatically whenever Ctrl, Cmd or Alt is also held, so ordinary shortcuts still work.
What it deliberately doesn't do
- It doesn't claim to detect ghosting itself. A browser only ever receives the key events the keyboard's own controller decided to report; if that controller invents a phantom keystroke, JavaScript has no way to distinguish it from a real one. What the tester gives you instead is the honest, observable half of the question — how many simultaneous keys register at all — which is the part you actually need to spot-check a rollover claim.
- It doesn't try to work around OS-level remapping. If Karabiner-Elements, PowerToys Keyboard Manager, or similar software has rewritten a key before it reaches the browser, this tool reports the rewritten result — correctly, since that's genuinely what the browser received.
- It doesn't send anything anywhere. Every key event is read and discarded entirely on your device. There is no server call, no analytics beacon tied to keystrokes, and nothing kept after the page closes.