Keyboard Key Tester

Test any key on your keyboard and inspect all event properties.

Click here, then press any key

Keyboard Layout

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

Key History

No keys pressed yet.

Keyboard tester online: test keys, view key codes, and diagnose keyboard issues

Whether you are testing a new mechanical keyboard, diagnosing a stuck key, or looking up the correct JavaScript key code for a custom shortcut, this tool gives you instant feedback for every key press. Press any key and see the key name, event.code, event.key, and legacy keyCode value displayed in real time alongside a visual keyboard layout that highlights the pressed key.

The tester is particularly useful for developers building keyboard-driven interfaces who need the exact key identifiers used by browser keyboard events, and for users who want to verify that every key on a keyboard is registering correctly after cleaning or repair.

Step-by-step guide

  1. 1
    Click the tool to focus it
    Click anywhere inside the keyboard tester panel to ensure the tool is focused and ready to receive key events.
  2. 2
    Press any key
    Press any key on your physical keyboard. The key is highlighted on the on-screen keyboard layout and the key details appear below.
  3. 3
    Read the key information
    See the key name, key code (numeric), the event.key value, and the event.code value as reported by your browser.
  4. 4
    Test modifier keys
    Press Shift, Ctrl, Alt, Meta (Windows key / Cmd), and Caps Lock to see their states and how they affect other key events.
  5. 5
    Diagnose stuck or broken keys
    If a key is not lighting up when pressed, or lights up without being pressed, it may be stuck or faulty. The tester is ideal for diagnosing mechanical keyboard issues.

Related Tools

Frequently Asked Questions

How does this keyboard tester work?
The tool listens to keyboard events (keydown, keyup) fired by your browser and displays the event.key, event.code, and event.keyCode properties returned by each event. Pressed keys are highlighted on a visual keyboard layout.
What is the difference between event.key and event.code?
event.key returns the logical key value (what character the key produces, e.g. 'A', 'Enter', ' '). event.code returns the physical key identifier regardless of the current keyboard layout (e.g. 'KeyA', 'Enter', 'Space'). This distinction matters for keyboard shortcuts that should work regardless of language layout.
What is a key code (keyCode)?
event.keyCode is a legacy numeric code representing the key pressed. It has been deprecated in favour of event.key and event.code in modern browsers but is still widely used in older code. The tester shows all three values for reference.
Can I test all keys including function keys and media keys?
Yes. Most standard keys including function keys (F1–F12), navigation keys (Home, End, Page Up, Page Down), and media keys (Play, Pause, Volume) generate events that the tester will display. Some keys may be intercepted by the OS or browser before reaching the page.
Why do some keys not register?
Certain key combinations (like Ctrl+W, Ctrl+T) are captured by the browser or operating system before the page sees them. These will not appear in the tester. This is expected behaviour.
Can I use this to find key codes for a custom shortcut?
Yes. This is a common use case. Press the key you want to use and read the event.code or event.keyCode value to use in your keyboard event listener code.
Does this tool send my keystrokes anywhere?
No. All key event processing happens entirely in your browser. Keystrokes are never transmitted to any server.
Is this tool free?
Yes, completely free with no account, no sign-up, and no usage limits.

AlteredIdea vs alternatives

vs server-side converters: AlteredIdea converts in your browser: your data never leaves your device.

vs writing scripts: Instant results, no coding needed.

vs paid tools: Completely free, no account required.