Keyboard tester and key codes
See every key you press on a full keyboard layout, with its key, code and keyCode values.
Loading…
Runs in this page in your browser; nothing is uploaded.
About this tool
Test every key on a keyboard online. Use it to check a new keyboard or a second-hand laptop key by key, to track down a key that does not respond, repeats or sticks, or, as a developer, to look up a key’s key, code and keyCode values.
A full layout with function keys, the arrow and editing block and the number pad shows each key you press: keys turn green once pressed and purple while held, and the page counts how many you have tested. The last 30 key events are listed. Keys are read in this page only and nothing is uploaded.
How to use it
- Press keys anywhere on the page; no text box is needed. Keep “Block browser shortcuts such as F5 and Tab” ticked so a key does not reload or leave the page.
- Press every key in turn and look for any that do not turn green.
- Check the key, code, keyCode, location and modifiers of the last key you pressed.
- Read the last 30 keydown and keyup events in the table, and select “Reset” to clear the results and start again.
Common questions
How do I test several keys pressed together (anti-ghosting)?
Hold the keys down at the same time: every key the computer receives shows in purple. If a key in the combination stays unlit, the keyboard cannot register those keys together.
What is the difference between key, code and keyCode?
key is the character or name the key produces and changes with Shift and the keyboard layout. code is the physical key, for example ShiftLeft and ShiftRight. keyCode is an older numeric code that is deprecated but still used by many programs.
Why does a key not light up?
Some keys are handled by the keyboard itself or by the system and never reach the page, such as the Fn key on most laptops, which is why the layout has no Fn key. Keys also cannot be detected while the page is not focused, so click the page and try again.
Can I test a Mac keyboard?
Yes. Command lights up the Win keys on the layout, and Option lights up the Alt keys.
What does “(repeat)” in the table mean?
When you hold a key down, the system keeps sending keydown events, and those are marked repeat. If one short press shows several keydown events without repeat, the key may be chattering.
Related tools
Camera test
Preview a camera at a chosen resolution, see its actual resolution and frame rate, and save a photo.
Microphone test
Check a microphone with a live waveform and level meter, and record five seconds to play back.
Mouse button tester
Test the left, middle, right, back and forward buttons, the wheel and double-click, and spot switch bounce.
Dead pixel test
Fill the screen with solid colours to find dead and stuck pixels.