Keyboard Tester – Test Keys Online
Press any key on your keyboard and instantly see it light up on a virtual layout — blue while pressed, green once verified — with the key code, keyCode and rollover count. Works with full-size, TKL, 60% and Mac layouts.
Press Any Key to Test It
Keyboard Test Formula
Where:
- \(c\) — a physical key, identified by its W3C
event.code(e.g.KeyA,ShiftLeft,Numpad7) - \(C\) — the set of all keys your keyboard can report
- \(\land\) — logical AND: both events must arrive
A key is marked as working only when the page receives both its keydown and its keyup event — a single event means a dead or stuck switch. The rollover count is how many keys are simultaneously down right now.
Keyboard Tester – Calculation Example
Example: with the default Full size (104 keys) layout, you press and release the A key once.
\[ \text{keydown} \to \text{code} = \text{KeyA},\; \text{keyCode} = 65,\; \text{location} = \text{main (0)} \qquad \text{keyup} \to \text{KeyA turns green} \]
Result: the A square lights blue while held, then turns green — Keys tested 1 / 104, Last key KeyA, Held now 0, Max held 1, and two rows appear in the event log.
How to Use the Keyboard Tester
- In Keyboard layout, pick the drawing that matches your hardware: Full size (104 keys), TKL, 60% or Mac. This changes only the picture — every key still registers in the event log even if it is not drawn.
- Leave Block scrolling & shortcut keys checked so Space, Tab, the arrows, F1–F12 and similar keys don't scroll the page or trigger browser actions while you test them. Uncheck it to keep your normal shortcuts.
- Click anywhere on the page outside the input form, then simply press keys on your real keyboard. Blue means the key is down right now; green means it was pressed and released successfully.
- Check the counters: Keys tested on this layout, Held now (rollover) and Max held. The event log below shows the last 20 presses with their code, key, keyCode and location.
- Press ↺ Reset test to clear the green marks, the log and the counters before a fresh pass.
What This Keyboard Test Actually Checks
A keyboard tester answers one question: does every switch on the board deliver its electrical signal to the computer? When you press a key, the controller sends a scan code that the browser exposes as event.code — a standard name tied to the key's physical position, not the legend printed on it. That is why this page draws a US QWERTY reference board: even if your system is set to AZERTY, Dvorak or a Cyrillic layout, each press lights up the same square, because the browser reports where the key sits, not which character it produces.
The green-marking logic matters for real fault finding. Lighting up on keydown alone would not prove much, because a fault often shows up as a key that never registers, registers twice, or stays "down". A key only turns green after both its press and its release arrive, so a full sweep of the board with every key green confirms that all switches, diodes and matrix traces work — exactly what you want when buying or selling a used keyboard, or when one key suddenly misbehaves in games or typing.
The Held now and Max held counters double as a rollover test. USB keyboards without dedicated gaming electronics typically stop reporting after about six simultaneous keys (6KRO) or may "ghost" presses that were never made. If the number freezes or drops while you mash keys, that is a hardware limit of the board, not an error on the page — full NKRO boards report dozens of held keys at once.
Limitations and Practical Tips
- Keys that never leave the keyboard: Fn-layer functions (Fn+F1, laptop Fn+arrows) and many media keys are processed inside the keyboard itself and are invisible to any software. Volume and brightness keys on a Mac arrive as media keys — enable Use F1, F2, etc. keys as standard function keys or hold Fn to test them as real F-keys.
- Keys the OS intercepts: system shortcuts such as Ctrl+Alt+Delete, Win, Cmd+Tab and Alt+Tab bypass every web page by design. Their keyup is also swallowed, which can leave a key blue — pressing it again or clicking away releases it.
- Auto-repeat is ignored: holding a key registers exactly one press, the way professional hardware testers count, so repeat settings don't distort your results.
- Same symbol, different keys: left/right Shift and numpad digits share printed legends but report different
locationvalues (main 0, left 1, right 2, numpad 3). Numpad digits on a Mac sit in a secondary layer and may not register. - Privacy: everything runs locally in your browser tab. Nothing is stored or sent anywhere, and the event log disappears with a reset or when you close the tab.
If your hardware is fine but your skills need a check too, try our reaction time test, measure your clicking speed with the CPS test, or verify other input devices with the online mic test and webcam test.
Frequently Asked Questions
How can I test my keyboard without an online tool?
Open any plain-text editor (Notepad, TextEdit) and type every key in order, then each Shift, Alt and Fn combination. This only proves keys can type characters — it misses stuck or doubled switches and does not show rollover. An online tester is better because it reads the raw hardware events (keydown and keyup) directly, so you also see silent faults: a key that works in Notepad but registers twice, or modifier and navigation keys an editor can't display.
Why do the Fn key and some media keys never light up?
The Fn key is handled entirely inside the keyboard's own controller, so its signal never reaches the computer — no software, online or offline, can see it. That is by design, not a defect. The same applies to many laptop Fn-layer functions (Fn+arrows, brightness) and media keys the operating system consumes before a browser ever sees them. Test the underlying physical keys directly: on a Mac, enable Use F1, F2, etc. keys as standard function keys or hold Fn to send real F-key codes.
What is a good rollover number — 6KRO or NKRO?
For everyday typing, 6-key rollover (6KRO) — where the counter freezes around six held keys — is perfectly fine, since normal typing rarely exceeds 2–3 simultaneous keys. Gamers and fast typists benefit from NKRO (n-key rollover), where dozens of keys register at once with no ghosting. If the Max held counter stops at 6, freezes, or drops while you mash keys, that is a hardware limit of the board, not a page error. Only keyboards with dedicated gaming electronics report more.
What is the difference between event.code, event.key and keyCode?
event.code names the physical key position (e.g. KeyA, ShiftLeft, Numpad7) and stays the same regardless of your language layout. event.key is the character your OS produced — it changes with AZERTY, Dvorak or Cyrillic settings. keyCode is the deprecated legacy number (e.g. 65 for A) that old software still expects; it is not fully standardized across all keys. For hardware testing, event.code is the reliable one, which is why the tester identifies keys by it.
Why does a key stay blue and never turn green?
A key that stays blue received a keydown but no keyup. Usually the keyup was swallowed by a system shortcut that also switched windows — Alt+Tab, Win, Cmd+Tab are common culprits. The page automatically releases all stuck keys the moment the browser tab loses focus; you can also press that key once more or hit Reset test. If the same key stays blue every time with no shortcut involved, that points to a genuinely stuck or chattering switch on the board itself.
Does this keyboard test work on a laptop or a wireless keyboard?
Yes. The tester reads standard keyboard events, so laptops, membrane boards, mechanical keyboards, and Bluetooth or USB dongle wireless keyboards all work the same — just click anywhere outside the small form and press keys. Two caveats: some laptop keys (Fn-layer, media functions) are processed inside the machine and will never appear, and Bluetooth connections occasionally drop or lag keyup events during a rollover test, which is a link issue, not a switch fault. Keep the battery charged for reliable results.
Can this tester detect key chatter or double-press problems?
Partially. Because OS auto-repeat is ignored and each press is logged once, a healthy key produces exactly one keydown plus one keyup in the event log. A failing switch often shows up as duplicated keydown events for a single, deliberate press, or a keydown that never gets its keyup. Watch the event log while pressing the suspect key slowly and firmly several times: repeated rows for one press, or a blue key that never turns green, strongly suggest switch wear — typically fixed by cleaning or replacing the switch.