Keyboard Tester

Press any key. It lights up blue while held and turns green once it has been tested.

–Last key
–event.code
–keyCode
0Held now
0Max at once
0Keys tested

Running a full keyboard check

  1. Click on the page once so it has focus, then press keys. A key turns blue while it is held and stays green afterwards, so you can see at a glance which ones you have not yet touched.
  2. Work through the picture row by row, from Esc along the top to the arrow keys at the bottom right. Press each key once and release it.
  3. Watch the counter named "Keys tested". The drawn layout contains 87 keys, so a counter of 87 with every key green means nothing was missed. Press "Reset" to clear everything and test again.

Alt+Tab, the Windows key and similar shortcuts may move you out of the page before it can register them. The held-keys list is cleared whenever the browser window loses focus, so a key you were pressing when that happened will not be stuck on screen.

In short

The tester follows event.code, the physical key position, so it can tell left Shift from right Shift even when a program sees the same keyCode for both. While it is open, Space, arrows, Tab and Backspace do not scroll or leave the page, but shortcuts with Ctrl or Meta still reach the browser.

Frequently asked questions

A key does not light up. Is it broken?

Try pressing it a few times and a bit harder. If it still does not register, clean under the key, test with another browser, and check whether the operating system catches it (some media or Fn keys are handled by the system before the browser sees them).

Why do Fn, Windows or Print Screen not work?

Browsers cannot see some keys, because the operating system or keyboard firmware handles them first. That does not mean they are broken.

What is ghosting?

Ghosting is when pressing several keys at once makes a key not register, or registers a key you did not press. Hold combinations you use (for example gaming keys) and watch “Max at once”.

Is my typing recorded?

No. Key presses are only displayed on this page and this tool does not send them anywhere.

Our test: which keys share a keyCode, and can the tester still tell them apart?

A script sent one simulated press for each of 104 keys in headless Chromium 153.0.8010.12: the 87 keys in the picture plus the 17 numeric keypad keys. The presses used the browser automation tool's built-in US layout, which sends keypad keys as if Num Lock were off. For every press we recorded the event.code, key and keyCode the page received.

keyCodeKeys sharing itevent.code shown by the tester
13Enter, keypad EnterEnter, NumpadEnter
16left Shift, right ShiftShiftLeft, ShiftRight
17left Ctrl, right CtrlControlLeft, ControlRight
18left Alt, right AltAltLeft, AltRight
33 to 36Page Up, Page Down, End, Home and keypad 9, 3, 1, 7PageUp, PageDown, End, Home, Numpad9, Numpad3, Numpad1, Numpad7
37 to 40the four arrow keys and keypad 4, 8, 6, 2ArrowLeft, ArrowUp, ArrowRight, ArrowDown, Numpad4, Numpad8, Numpad6, Numpad2
45, 46Insert, Delete and keypad 0, keypad decimal pointInsert, Delete, Numpad0, NumpadDecimal

The 104 presses produced 104 different event.code values but only 90 different keyCodes: 14 keyCodes were each shared by two keys. After the run, 87 squares were green and "Keys tested" read 104, because the keypad keys count without having a square.

What it means: if a game or older program cannot tell left Shift from right Shift, or reacts to keypad 8 as if it were the up arrow, it is probably reading keyCode. The tester follows event.code, so it still shows which physical key you pressed. We did not test the keypad with Num Lock on.

Our test: which keys does the tester stop, and which shortcuts still reach the browser?

A script pressed 25 keys and key combinations on the tester in headless Chromium 157.0.8103.78. Before each press it clicked Reset and scrolled to the top of the page. For every key event we recorded whether the page had cancelled the browser's default action for it, and how far the page scrolled. The browser window was 1280 by 600 pixels. As a control, we loaded the same page with its scripts switched off and pressed the four scrolling keys again.

Keys pressedDefault actionPage scrolled with the testerPage scrolled, scripts off
Spacecancelled0 px525 px
Page Downcancelled0 px525 px
Endcancelled0 px4,434 px
Down arrowcancelled0 px40 px
Tab, Shift+Tab, Backspace, / and 'cancelled0 pxnot tested
F1, F3, F5, F7, F11 and F12cancelled0 pxnot tested
Shift+Spacecancelled for both keys0 pxnot tested
Alt+Left arrow, Alt+Fcancelled for both keys0 pxnot tested
Ctrl+S, Ctrl+F, Ctrl+P, Ctrl+D, Ctrl+A, Meta+Ccancelled for Ctrl or Meta, passed on for the second key0 pxnot tested
Ctrl+Shift+Icancelled for Ctrl, passed on for Shift and I0 pxnot tested

Every key still registered: it turned green, and "Last key", "event.code" and "Keys tested" updated. Then we held ten letters plus Shift, Ctrl and Alt together. "Held now" and "Max at once" both read 13. Pressing one of the held letters again left "Held now" at 13. When we sent the window a blur event, the signal a browser gives when the window loses focus, "Held now" dropped to 0 and "Max at once" stayed at 13.

What it means: Space, Page Down, End, the down arrow, Tab and Backspace did not move the page while the tester was open. A shortcut that holds Ctrl or Meta is different: the page did not cancel its second key, so the browser is free to act on it, as it normally does with Ctrl+P for printing. Ctrl and Meta still register on the tester in these combinations. We did not watch which dialogs the browser opened. Simulated presses have no hardware limit, so 13 only shows that the counter is not capped below 13. With a real keyboard, the number you reach is the keyboard's rollover. The headless browser has no reload, full-screen or help action to watch, so for function keys we recorded only that the page cancelled the default action. We did not see what a desktop browser would do with them. Meta is the key a Mac labels Command and a Windows keyboard labels with the Windows logo; our presses were simulated on Linux.

More details

How to test your keyboard

  1. Click anywhere on this page and start pressing keys.
  2. Each key you press on the layout above turns green. Any key that never lights up may be dead or blocked.
  3. Hold several keys at once to see how many your keyboard can register together (key rollover).

What do the numbers mean?

event.code is the physical key position (for example KeyA), the same on every layout. keyCode is the older numeric code. “Max at once” shows the highest number of keys held at the same moment — useful for spotting ghosting on budget keyboards.

Reading the six numbers

  • Last key is the value of the key event. It depends on your layout and on Shift: pressing the key beside Tab shows "q" or "Q" depending on Shift, and on a French layout the same physical key gives "a".
  • event.code names the physical location, independent of layout. KeyQ is always the key to the right of Tab, whatever is printed on it. This is the value the coloured board follows.
  • keyCode is an older numeric code. Browsers still report it, but it is deprecated, and programmers are advised to use the code and key values instead. It is shown because many older scripts and games still depend on it.
  • Held now counts the keys currently down. Max at once remembers the highest number reached since the last reset.

Holding a key down makes the operating system send repeated press events, but the tester stores keys by name, so a repeating key still counts as one held key.

Testing rollover and ghosting

Keyboards report presses through a wiring grid called a matrix. On cheap models, certain combinations of three or more keys cannot be told apart electrically, so a key goes missing or a phantom one appears. This is ghosting. Rollover describes how many simultaneous keys are reported correctly.

To test it, press and hold keys one at a time and watch "Held now". Try the combination that matters to you, for example W, A and Space plus Shift for a game, or hold six letter keys and then add a seventh. A keyboard limited to six ordinary keys, which is a common limit for standard USB reports, will stop counting once you pass six non-modifier keys; modifiers such as Shift and Ctrl are reported separately and do not use up those slots. Gaming boards advertise "N-key rollover" and should keep counting as you add fingers, as far as your hands allow. Results can also differ between wired and wireless modes and between operating systems.

Diagnosing a key that does nothing

  • Press it several times, including slowly and firmly, to separate a worn contact from a one-off miss.
  • Try the key in a different program, such as a plain text editor. If it works there but not here, the browser cannot see it.
  • Try another USB port, or another computer. A key that fails everywhere points to the keyboard; a key that works elsewhere points to software or a driver.
  • If a key types twice or sticks, tap it repeatedly and watch whether the "Held now" count stays above zero after you let go. Crumbs and spilled drinks are the usual cause.
  • Check whether Fn or a gaming-mode switch changes the result. Some boards disable the Windows key or remap the function row on purpose.

What this tester cannot show

  • The picture is a full-size layout without the numeric keypad. Keypad keys still register and appear in "Last key", "event.code" and the "Keys tested" count, which means that count can exceed 87, but they have no square to light up.
  • Some keys, such as Fn, volume and brightness keys, and often Print Screen, are handled by the operating system or keyboard firmware before the browser receives anything.
  • Most key presses are blocked from triggering browser actions while you are testing, so the page does not scroll or open menus. Combinations that hold Ctrl or Command with another key are let through so that normal browser shortcuts keep working.
  • The layout shown is a US-style one. Other layouts have a different arrangement of keys near Enter and the left Shift key; the physical keys still register under their codes.

More questions

Why does my key show a different letter than the one printed on it?

"Last key" follows your operating-system layout, while event.code follows the physical position. If the two disagree with the printed legend, check the keyboard language setting in your system.

How can I tell a dead key from a key the browser cannot see?

Test the same key in a text editor or a built-in system tool. If it works there but never lights up here, it is handled before the browser sees it. If it works nowhere, the key or its contact is faulty.

Does a lower "Max at once" mean my keyboard is faulty?

Not necessarily. Many ordinary office keyboards are designed to report only six keys plus modifiers, and that is a normal limit rather than a defect.

Related guides

More in Hardware tests