Keyboard Key Tester
Test any key on your keyboard and inspect all event properties.
Click here, then press any key
Keyboard Layout
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
- 1Click the tool to focus it
Click anywhere inside the keyboard tester panel to ensure the tool is focused and ready to receive key events. - 2Press 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. - 3Read the key information
See the key name, key code (numeric), the event.key value, and the event.code value as reported by your browser. - 4Test modifier keys
Press Shift, Ctrl, Alt, Meta (Windows key / Cmd), and Caps Lock to see their states and how they affect other key events. - 5Diagnose 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
Browser Info
Inspect your browser, OS, screen, network, and feature support in real time. Hardware concurrency, touch points, WebGL, WASM, and 18 more APIs checked.
User Agent Parser
Parse any user agent string into browser, engine, OS, device type, and bot detection. Test with 6 sample UAs or paste your own.
Color Converter
Convert colors between HEX, RGB, HSL, HSV, and CMYK instantly. Visual swatch, color picker, named color lookup, and WCAG contrast ratio.
Unit Converter
Convert between units across 7 categories: length, weight, temperature, area, volume, speed, and digital storage. All conversions shown simultaneously.
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.