Keyboard tester
Press any key: it lights up while held and turns green once it has worked. Runs in your browser; nothing is uploaded.
Click the keyboard below, then press keys.
0 of 0 keys tested Most keys held at once: 0Last key event
- key
- -
- code
- -
- keyCode
- -
- which
- -
- location
- -
- modifiers
- -
- repeat
- -
- event
- -
Keys pressed (newest first)
How to use the keyboard tester
- Click the on-screen keyboard (or Tab to it). It gets a blue outline when it is listening.
- Press each key in turn. Keys turn blue while held and green once they have registered.
- Look for keys that stay grey: those have not sent anything to the browser.
- Hold several keys together to check rollover; the counter shows the most keys registered at once.
- Press Reset to start again. While the tester has focus, Space, the arrow keys, Page Up/Down and F-keys do not scroll or trigger the page.
By default Tab still moves focus, so keyboard users can leave the tester (Tab is still marked as tested). Tick "Capture the Tab key too" to keep focus here; press Esc twice quickly to leave.
Reading the key details
Every key press creates a keyboard event in the browser. The panel shows its main properties:
- key: what the key means right now, taking your layout and modifiers into account (
a,A,@,Enter,ArrowUp). - code: the physical key, named after its position on a US keyboard (
KeyA,Digit2,ShiftRight,Numpad5). It is the same whatever language your keyboard is set to. - keyCode and which: older numeric codes. They are deprecated in the web standards but still sent, and older code still relies on them.
- location: 0 for a normal key, 1 for the left and 2 for the right copy of Shift, Ctrl, Alt and the Windows/Command key, and 3 for the number pad.
- repeat: true when the key is being held and the system is auto-repeating it.
Developers can find the full definitions in MDN's
KeyboardEvent reference.
If you are building something that reacts to shortcuts, use code for positions (like WASD in games)
and key for meaning (like Ctrl+Z).
Ghosting, rollover and stuck keys
Most keyboards scan their keys as a grid of rows and columns. Pressing certain combinations of three or more keys can make the keyboard unable to tell which keys are down, so it either ignores one (blocking) or reports one you did not press (ghosting). Key rollover is how many keys a keyboard can register at once: "N-key rollover" keyboards report every key independently.
To test, hold combinations you actually use, such as Shift + W + A + Space in a game, and check every key lights up. If a key appears that you are not pressing, that is ghosting. If a key stays blue after you let go, the browser missed its release: that can happen when another window takes focus or a system shortcut eats the key-up event. Click away and back to clear it.
Keys a browser cannot test
- Fn is handled inside the keyboard and is never sent to the computer as a key.
- System shortcuts such as Ctrl+Alt+Delete, Alt+Tab, the Windows key on its own (it opens Start) and Command+Tab on a Mac are taken by the operating system first.
- Some browsers reserve shortcuts like Ctrl+W, Ctrl+T and Ctrl+N; pressing them may close or open a tab.
- Print Screen on Windows often sends only a key-up event; the tester still counts it.
- Volume, media and laptop brightness keys are often handled by drivers. If the browser receives them, they appear under Other keys.
If keys are not working
Quick checks
- Try a different USB port, or plug a wireless keyboard's receiver directly into the computer rather than a hub. Replace or charge the batteries.
- Turn off Num Lock if the number pad types arrows, and check Filter Keys or Sticky Keys are not on in your accessibility settings.
- Check the input language: if the wrong characters appear but the right keys light up here, the layout setting is wrong, not the keyboard.
- For sticky or dead keys, turn the keyboard off or unplug it, then use compressed air at an angle to blow out debris.
Checking the rest of your setup? Try the microphone test and the webcam test. For typing work, the character counter and case converter are on the same site.
Frequently asked questions
How do I test my keyboard online? +
Open this page and press every key. Each key on the on-screen keyboard lights up while it is held down and turns green once it has worked, so any key that stays grey has not registered. The panel underneath shows the key name, code and keyCode of the last key you pressed, and a history of your key presses.
Why does a key not light up? +
Either the key is not sending anything (a hardware or driver fault, dirt under the key, or a dead switch), or your operating system intercepts it before the browser sees it. The Windows key combinations, Fn, Ctrl+Alt+Delete, some media keys and some laptop function keys never reach a web page, so those cannot be tested in a browser.
What is the difference between key, code and keyCode? +
key is the character or action the key produces with your current layout and modifiers, such as a, A or Enter. code names the physical key position on a US layout, such as KeyA or ShiftLeft, whatever your language. keyCode is an older numeric value that browsers still send for compatibility but which is officially deprecated.
How do I test keyboard ghosting or rollover? +
Hold down several keys at once and watch the Most keys held at once counter. If some keys you are holding do not light up, your keyboard has hit its rollover limit or is ghosting on that combination. Many office keyboards register only certain combinations of three or more keys; gaming keyboards often support more.
Does this keyboard tester work with non-US keyboards? +
Yes. Keys are matched by their physical position, so every key lights up on the US ANSI picture even if its printed label is different. ISO keyboards have an extra key next to left Shift; it shows up in the Other keys list rather than on the picture.
Is this keyboard tester safe? Does it log what I type? +
Everything happens inside this browser tab. Key presses are shown on screen and never sent anywhere or saved. Reloading the page clears the history.