GALAXY OF TOOLS

DEVICE SECTOR

Keyboard Tester

Press any key and watch it light up. Find dead keys, check key codes and test n-key rollover.

0 keys tested
—event.key
—event.code
—keyCode / which
—Location
—Modifiers
—Repeat
Rollover testHold several keys at once
0Keys held now
0Most at once
Held keys appear here.
Recent keysNewest first
Nothing pressed yet.

Phones and tablets: the on-screen keyboard of a phone does not send physical key codes, so most keys won’t light up — connect a Bluetooth or USB keyboard to test it. Browser shortcuts such as Ctrl+W, Ctrl+T or Alt+F4 are handled by the browser or operating system before this page sees them.

Runs entirely in your browser. Nothing you enter or upload is sent to a server.

Test every key on your keyboard in the browser

The Keyboard Tester shows a full on-screen keyboard that lights up as you press real keys, so you can find a dead key, a stuck key or a key that fires twice without installing anything. Keys you have pressed stay highlighted, and a counter shows how many of the keys on the diagram you have covered.

Every press also shows the exact values a browser receives — event.key, event.code, the legacy keyCode, the key location and which modifiers were held — which is what web developers, game makers and people building keyboard shortcuts need. A rollover counter shows how many keys the keyboard can report at the same time.

It works with laptop keyboards, desktop keyboards, mechanical boards, Bluetooth and USB keyboards on Windows, macOS, Linux and ChromeOS, in any modern browser, and nothing you type is stored or sent anywhere.

How to use the Keyboard Tester

  1. Click the dashed test area so it turns green — the page is now listening for keys.
  2. Press each key you want to check. It lights up while held and stays tinted once it has been pressed and released.
  3. Switch between Full size (104-key, with navigation cluster and numpad) and Compact / laptop to match your keyboard.
  4. Read event.key, event.code, keyCode, location, modifiers and the repeat flag for the last key in the panel below.
  5. For the rollover test, hold down several keys together — the “Keys held now” number should match what you are pressing.
  6. Press Esc (or click elsewhere) to release the keyboard, and Reset to clear the highlights.

Keyboard Tester features

Live key highlighting

Keys light up as they are held and stay marked once tested, with a running count of tested keys.

Two realistic layouts

A full-size ANSI layout with function row, navigation cluster and numpad, or a compact laptop layout with an Fn key and arrow cluster.

Detailed event readout

Shows key, code, keyCode/which, left/right/numpad location, active modifiers (including AltGr, Caps Lock and Num Lock state) and whether the event is an auto-repeat.

Rollover and ghosting check

Counts the keys held simultaneously and remembers the maximum, so you can see whether your keyboard supports 6-key or n-key rollover.

Tab, F-keys and arrows included

While the test area is focused, the page prevents the browser’s default action so Tab, Space, function keys and arrows can be tested without the page scrolling or losing focus.

Scales to any screen

The keyboard diagram resizes to fit, from a phone in landscape to a wide monitor.

key vs code vs keyCode — what the values mean

event.key is the character or action the key produces with the current layout and modifiers: pressing the key left of 1 gives “`” on a US layout, and Shift+a gives “A”. event.code is the physical position of the key, named after the US layout, so it stays KeyQ even on an AZERTY keyboard where that key types “a”. Games use code so WASD stays in the same place; text input uses key.

keyCode and which are deprecated numeric values kept for old scripts (A is 65, Enter is 13, Space is 32, Escape is 27). Location tells left and right Shift, Ctrl and Alt apart and marks numpad keys. Repeat is true for the extra keydown events your operating system generates while a key is held.

How to spot a dead, stuck or chattering key

  • Dead key: nothing lights up and the readout does not change. Try the same key with the test area re-focused; if it still does nothing, the switch or membrane under it is faulty.
  • Stuck key: a key stays lit (and in “Keys held now”) after you let go. Dirt or a damaged switch is usually keeping the contact closed — clean around the keycap.
  • Chattering / double-typing: one press shows up twice in the “Recent keys” list without the repeat flag. Common on worn mechanical switches; on Windows, raising the repeat delay does not fix it, but firmware debounce settings or a switch swap do.
  • Wrong character: code is right but key is not — the operating system language or keyboard layout is set incorrectly, not the hardware.
  • Ghosting: while holding three keys, a fourth key you never pressed appears, or a key you are pressing is missing. The keyboard’s matrix cannot represent that combination.

Rollover: 2KRO, 6KRO and NKRO explained

Key rollover is how many keys a keyboard can register at once. Cheap membrane keyboards manage two or three plus modifiers. Most USB keyboards report 6-key rollover (6KRO) because the basic USB keyboard report carries six keys plus modifiers. Gaming and mechanical keyboards advertise n-key rollover (NKRO), meaning every key is reported independently — hold down ten letters and “Keys held now” should read 10.

To test it, hold progressively more keys with both hands and watch the counter. If it stops at 6, the keyboard (or its USB mode — some have a BIOS-compatible toggle) is limited to 6KRO. Modifier keys do not count against the six. For typing speed rather than hardware, try the Typing Speed Test; for mouse buttons, the CPS Test.

Keyboard Tester FAQ

Why do some keys not light up?

Some keys never reach a web page: the Fn key is handled inside the keyboard, Windows intercepts the Windows key combinations, PrintScreen and media keys may be captured by the system, and browser shortcuts such as Ctrl+T or Ctrl+W act before the page sees them. Everything else, including Tab, arrows and F1–F12, is captured while the test area is focused.

Does this keyboard tester work on a phone?

Only partly. A phone’s on-screen keyboard sends characters, not physical key codes, so the tester shows the typed character but cannot light up keys on the diagram. Connect a Bluetooth or USB keyboard to the phone or tablet to test it properly.

What is the difference between event.key and event.code?

event.key is what the key produces (“a”, “A”, “Enter”), which depends on your layout and modifiers. event.code is the physical key position (“KeyA”, “Enter”, “NumpadEnter”), which is the same on every layout.

Why does my numpad show arrows and Home instead of numbers?

Num Lock is off. With Num Lock off the numpad keys act as navigation keys, and event.key reports ArrowUp, Home and so on, while event.code still says Numpad8 or Numpad7.

My keyboard says NKRO but the counter stops at 6. Why?

Some keyboards start in a 6KRO “BIOS mode” for compatibility and switch to NKRO with a key combination or in their software. Also check you are not using a USB hub or KVM switch, which can limit the report size.

Is anything I type recorded?

No. Key events are handled in your browser, the text box is cleared instantly, and nothing is stored or sent to a server.

You might also need