Keyboard Tester
Test every key of your keyboard against a map on screen: find dead, stuck and chattering keys, check rollover and read each key's JavaScript codes.
0 of 104 keys tested
Click here or press any key to start
Escape then Tab moves focus on. Ctrl+W closes this tab: test W on its own.
Key details
Press a key to see its codes.
Keys down nowMost at once: 0
- None
Hold several keys together: any that do not light are not being reported — your keyboard’s rollover limit or ghosting.
Chatter
A key that types twice from one press shows here.
Press each key on your keyboard and watch it light on the drawing. A key that never lights is not reaching the computer. The test also times keys held down, catches chatter (one press typed twice), counts how many keys your keyboard reports at once, and shows the JavaScript properties of every key event for developers writing keyboard shortcuts.
Nothing you type leaves this page or is saved: the test keeps a count for each key in memory and forgets it when you leave or press Reset. Only the keyboard size you pick is remembered on this device.
Reading the results
A key goes through four looks: plain until pressed, a solid fill while held down, a tint once tested, and a red outline when it is flagged. The count above the keyboard tracks how many of the drawn keys have been tested.
Rollover. Keys down now lists every key held, with the most held at once this session. Press several keys together: when one does not light, the keyboard did not report it. Many keyboards stop at a fixed number of keys (in their basic USB mode, six plus the modifiers), and many membrane and laptop keyboards drop certain combinations of three or more because of how their keys are wired. A keyboard that reports a key you did not press is ghosting. The page sees only what the keyboard sends, so it cannot tell a rollover limit from ghosting.
Chatter. A worn or dirty switch can register one press as two. A press that comes less than 30 ms after the same key was released is counted as chatter and the key is outlined; a deliberate second press of one key takes longer than that. Auto-repeat from holding a key is never counted.
Stuck keys. A key held 3 seconds or more shows how long, and is outlined until released. A key that stays down when you are not touching it is stuck, or its switch is shorted.
What a browser cannot see. Fn is handled inside most keyboards and never reaches the computer, so it cannot be tested here; the keys it changes, such as media keys, show under Other keys if the browser receives them. Keys the operating system takes for itself (the Windows key opening Start, Ctrl+Alt+Delete, a screenshot key) may not reach the page outside full screen. When focus leaves the test, for another window or a click elsewhere, keys still held are let go, since their release will never arrive here, and a note says so.
How to use it
- Start — the keyboard takes the focus when the page opens; click it if something else has the focus. Until you press a key other than a modifier, Tab moves focus as usual. After that every key is kept on the page, so Space does not scroll and Tab is tested; Escape then Tab moves focus on. On a touch screen the page says a physical keyboard is needed until a key is pressed on one.
- Size — Full (104 keys on a US board), Tenkeyless (87, no numpad) or 75% (84, the compact board with the arrows under a short right Shift). Your choice is remembered on this device.
- Shape — the drawing starts as ANSI, the US shape. Pressing the key between left Shift and Z (on a Mac in Chrome or Safari, the key left of 1), which only ISO keyboards have, switches it to ISO (105 keys at full size); ¥ or ろ switch it to Japanese (JIS). A note says so, with Use ANSI to go back.
- Labels — in Chrome, Edge and Opera the keys are labelled from your own layout, so a French AZERTY keyboard shows A where a US one has Q. Other browsers do not share the layout, so the keys start with US labels and each takes its own character once pressed. On a Mac, Command and Option show as ⌘ and ⌥.
- Other keys — a key the drawing lacks, such as F13 or a media key that reaches the browser, is listed under the keyboard, so no press goes unseen.
- Key details — the last event’s
key,code,keyCode,location, the modifier flags,repeat,isComposing, Caps Lock and Num Lock. Copy test copies a line such asevent.code === "KeyA". - Full screen — in Chrome, Edge and Opera, full screen also locks the keyboard to the page, so Esc, the Windows key and Alt+Tab are tested rather than acted on; holding Esc still leaves full screen. Ctrl+Alt+Delete, and ⌘Tab on a Mac, stay with the system. Elsewhere it is full screen only.
key, code and keyCode
A key event carries two names. event.key is what the key means with the current layout and modifiers: "a", "A" with Shift, "q" on the same key of an AZERTY keyboard, or "Enter". event.code is the physical key, named after its place on a US keyboard, whatever the layout: "KeyQ" is the key right of Tab everywhere. Use key for text and shortcuts that follow a letter, and code for keys chosen by position, such as WASD in a game.
event.keyCode is the older number. The UI Events standard keeps it only for old pages and calls it legacy: its value depends on the browser, the operating system and the layout. Only some keys have a value the standard fixes — letters and digits take their upper-case ASCII codes, Backspace to Delete a fixed table — and punctuation has values browsers send for a US layout but may change for others. The Key details panel shows the number your browser actually sent.
The tester draws from code, so a key lights in the same place on any layout. Left and right modifiers are told apart (ShiftLeft, ShiftRight), and the numpad keeps its Numpad codes with Num Lock off, when it sends arrows and Home instead of digits. On Windows, AltGr arrives as a left Ctrl press and then right Alt; the tester drops that left Ctrl, so only right Alt lights and a dead left Ctrl cannot pass for working through AltGr.
Key codes of common keys
| event.key | event.code | keyCode |
|---|---|---|
a | KeyA | 65 |
z | KeyZ | 90 |
1 | Digit1 | 49 |
0 | Digit0 | 48 |
" " | Space | 32 |
Enter | Enter | 13 |
Tab | Tab | 9 |
Backspace | Backspace | 8 |
Escape | Escape | 27 |
Shift | ShiftLeft | 16 |
Shift | ShiftRight | 16 |
Control | ControlLeft | 17 |
Alt | AltLeft | 18 |
Alt | AltRight | 18 |
Meta | MetaLeft | — |
CapsLock | CapsLock | 20 |
ArrowLeft | ArrowLeft | 37 |
ArrowUp | ArrowUp | 38 |
ArrowRight | ArrowRight | 39 |
ArrowDown | ArrowDown | 40 |
Delete | Delete | 46 |
Home | Home | 36 |
End | End | 35 |
PageUp | PageUp | 33 |
PageDown | PageDown | 34 |
- | Minus | 189 |
= | Equal | 187 |
[ | BracketLeft | 219 |
] | BracketRight | 221 |
\ | Backslash | 220 |
; | Semicolon | 186 |
' | Quote | 222 |
` | Backquote | 192 |
, | Comma | 188 |
. | Period | 190 |
/ | Slash | 191 |
F1 | F1 | — |
Insert | Insert | — |
1 | Numpad1 | — |
Enter | NumpadEnter | 13 |
— | IntlBackslash | — |
Frequently asked questions
KeyY; that is expected, not a fault.keydown and keyup. keypress is deprecated and never fires for keys such as Shift or the arrows. While an input method composes text, key is "Process", keyCode is 229 and isComposing may be true; the key still lights by its code. A dead key, which adds an accent to the next letter, reports "Dead".See also
- Typing Test — Measure your typing speed and accuracy once every key works.
- Touch Typing Practice — Learn to type without looking, one finger's keys at a time.