Keyboard Tester

Press any key to light up its keycap, test multi-key rollover and track per-key counts. The panel shows event.key, code, keyCode and modifier combos.

Keep the focus on this page and press keys on your keyboard. A lit keycap means the event arrived, and it goes dark when you release. On touch screens, tap the keycaps instead.

key-
code-
keyCode-
location-
Modifier combo-
Total0
Held0
Distinct keys0

Keycap labels are English. Both language versions look the same. Every check runs locally in your browser, and nothing you press is stored or uploaded.

How to use

  1. Keep this page focused and press any key. The matching keycap lights up, a counter on the cap records the press, and the highlight clears on release.
  2. Hold several keys together to light multiple caps at once and feel out rollover. Membrane boards often drop keys after three or four, which is a hardware limit.
  3. Read the panel below. event.key is the character result, event.code names the physical key, and location separates left, right and numpad. keyCode is the legacy number kept for old scripts.
  4. Press the reset button after a round to zero every counter and the stats for a clean start.
  5. On phones and tablets, tapping a keycap counts as a press and reveals that key's code name.

FAQ

A key does nothing on the page, what now?
Make sure the focus sits on the page rather than the address bar. Browser level combos such as F5 or Ctrl+T are handled before the page sees them. Some input methods swallow keys in candidate mode, so switch to English mode and retry. The Fn key usually produces no system event, which is why it has no cap here.
Is anything I type uploaded?
No. The page listens to key events only to update the highlight and the counters, and every value stays in the current tab. Nothing is written to local storage and no request leaves the browser.
Can I hold several keys at once?
Yes. Each held key keeps its cap lit, so the page shows every key that is down at the same time. How many keys register together depends on the keyboard hardware and its rollover design, not on this page.
What is the difference between code and keyCode?
event.code names the physical position and stays the same across layouts and input methods, while event.key is the character produced after such processing. keyCode is a legacy numeric value kept for old scripts. New work should rely on code first.

How to use

  1. Press any key

    Keep this page focused and hit keys on your keyboard. The matching keycap lights up at once and returns to normal on release. A small counter on the cap records every press of that key.

  2. Try several keys at once

    Hold a few keys down together to light several caps at the same time. This shows how your board handles rollover. Membrane keyboards often drop keys after three or four, which is a hardware limit.

  3. Read the key details

    The panel lists event.key, event.code, keyCode, location and the active modifier combo for the last press. Copy the values from here when you debug shortcuts or write scripts.

  4. Reset the counters

    Press the reset button to clear every per-key counter and the totals for a clean new round of testing.

  5. Touch screens work too

    On phones and tablets, tapping a keycap counts as a press and shows its code name. That is handy for looking up a key without a physical board.

About this tool

Keyboards fail quietly. Spilled coffee, dust and years of heavy typing wear out individual switches. Daily typing never covers every key, so a dead key often hides until the day you need it. This page draws a complete 103 key layout covering the function row, the main block, the navigation cluster, the arrow keys and the numeric keypad. Press a key and its keycap lights up while a counter records the hit. Walking through every cap takes a few minutes and gives any new, second hand or freshly cleaned board a full check.

The info panel uses standard browser fields. event.code names the physical position and never changes with your input method or layout. event.key reports the character produced after such processing. keyCode is the legacy number older scripts rely on, frozen for years but still reported by every browser. location tells you which copy of a key was pressed, so the two Shift keys report 1 and 2. Everything runs inside the page, and nothing you type is stored or sent anywhere.

How it works

Every keystroke becomes a KeyboardEvent in the browser. keydown fires the moment a cap goes down, keyup fires on release, and holding a key repeats keydown at the system rate. The page matches keycaps through the physical event.code, so highlight and counting keep working while an IME is composing text. Highlight state lives in the script, and any number of caps can stay lit at once, which makes the real limit easy to see. Full n key rollover boards register a dozen simultaneous keys without trouble. Many membrane keyboards start dropping keys after four or five. That limit comes from the internal key matrix, not from the page.

keyCode dates back to the browsers of the nineties. Vendors once disagreed on the numbers, the value was later standardised and marked as deprecated, yet every browser still reports it for old scripts. event.code comes from the W3C UI Events specification and follows the names of the US physical layout. A Japanese keyboard still reports QWERTY codes for its kana keys. location uses the digits 0 to 3 for the standard area, the left side, the right side and the numeric keypad. Knowing how the three fields split their work makes shortcut debugging, automation scripts and input method setup much easier.

When to use it

  1. Checking a new keyboard

    Before the return window closes, walk through every key once and compare the highlight and counters. Dead switches, stuck repeats and rollover weak spots all show up within minutes. That makes the tool a quick acceptance test for a new or second hand board.

  2. Chasing a dead shortcut

    When a shortcut stops working, press its keys here and read the panel. If the highlight and codes look right, the keyboard is fine. The problem then sits in the app settings, the input method or another program grabbing the keys first.

  3. Scripts and key mapping

    When you write automation scripts, game key maps or browser extension shortcuts, read event.code, keyCode and location straight from the panel. No more guessing key names from documentation. It also saves a round of trial and error on every new project or platform.

Tips & tricks

  • Sweep the board from Escape to the right Ctrl and watch each counter tick up, a full check takes about three minutes.
  • Suspect a dead key? Reset first, then test that single key a few times so old counts cannot mislead you.
  • Use event.code from the panel as the key name in macros and scripts, it stays stable across input methods and layouts.

Things to watch

  • Browser reserved keys

    F5, Ctrl+T and similar browser shortcuts are handled before the page ever sees them. Those caps stay dark and their counters do not move, so treat the missing events as expected behaviour rather than a broken key. Browser level handling also varies by platform, so a cap that stays dark on one device may still work on another.

  • Input method interception

    Some input methods swallow key events in candidate or full width modes, so a dark cap does not prove a broken switch. Switch to English mode and test again for a cleaner result before you blame the hardware itself. A quiet single key test in English mode gives the cleanest signal.

  • Rollover is hardware

    The page can light every cap at once, but membrane keyboards often drop keys above four. Even mechanical boards depend on their diode design for rollover. If keys vanish together, try another USB port or a second keyboard before you judge the board faulty.

Related Tools