Keyboard Tester

Press keys and watch them light up on the on-screen keyboard to find any that do not respond, such as after a spill, on a second-hand laptop or with a new mechanical keyboard. For developers, each press shows event.key, event.code, the old keyCode, which side it came from (left or right Shift, number pad) and the modifiers held, and common combinations are named, like Ctrl + Shift + T for reopening a tab.

Click here, then press keys.

Esc
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
F11
F12
PrtSc
Del
`
1
2
3
4
5
6
7
8
9
0
-
=
Backspace
Tab
Q
W
E
R
T
Y
U
I
O
P
[
]
\
Caps
A
S
D
F
G
H
J
K
L
;
'
Enter
Shift
Z
X
C
V
B
N
M
,
.
/
Shift
Ctrl
Win
Alt
Space
Alt
Menu
Ctrl
←
↑
↓
→

0 of 79 keys on this layout pressed.

Last key

Nothing pressed yet.

History

  1. Empty

Some keys never reach a web page: the Windows key on its own, Fn, and combinations the system takes first (Alt+Tab, Ctrl+Alt+Del). Those can work fine even if they stay unmarked here.

Key testing runs in your browser. What you type never leaves this device.

Features

  • Full layout that marks every key you press

  • Counter of keys tested so far

  • event.key, event.code, keyCode and location

  • Left and right modifiers told apart

  • Names of common Windows and Mac shortcuts

  • Option to block browser shortcuts while you test

Why test a keyboard

Buying or selling a used laptop

Press every key in a minute and see at a glance which ones fail.

After a spill or repair

Check whether sticky or dead keys came back.

Writing keyboard shortcuts

Find the exact key and code values your JavaScript handler will receive.

Testing tips

Keys a web page cannot see

  • Fn, and on many laptops the media and brightness keys, are handled by the hardware or system.
  • Combinations the system takes first, such as Alt + Tab, Ctrl + Alt + Del and the Windows key on its own.
  • Print Screen sends only a key-up on Windows; it is marked once released.

key or code?

event.code is the physical key (KeyA is the key labelled A on a US layout), whatever language you type in. event.key is the character it produces, which changes with layout and Shift. Use code for game controls and key for text shortcuts. keyCode is deprecated but still shown for old code.

Keyboard Tester - FAQ