🔒 Runs in your browser — nothing is uploaded✓ Free, no signup
JavaScript Keycode Finder
Press any key to see its event.key, event.code and keyCode values, with modifiers and a ready-to-paste keydown handler.
Press any key
Its key, code and keyCode will appear here.
Common key codes
| event.code | event.key | keyCode |
|---|---|---|
| Enter | "Enter" | 13 |
| Escape | "Escape" | 27 |
| Space | " " | 32 |
| Tab | "Tab" | 9 |
| Backspace | "Backspace" | 8 |
| Delete | "Delete" | 46 |
| ArrowLeft | "ArrowLeft" | 37 |
| ArrowUp | "ArrowUp" | 38 |
| ArrowRight | "ArrowRight" | 39 |
| ArrowDown | "ArrowDown" | 40 |
| ShiftLeft | "Shift" | 16 |
| ControlLeft | "Control" | 17 |
| AltLeft | "Alt" | 18 |
| MetaLeft | "Meta" | 91 |
| KeyA | "a" | 65 |
| Digit0 | "0" | 48 |
| F1 | "F1" | 112 |
| Home | "Home" | 36 |
| End | "End" | 35 |
| PageUp | "PageUp" | 33 |
| PageDown | "PageDown" | 34 |
When should you use the Keycode Info?
- Writing keyboard shortcuts for a web app
- Checking what a key reports on a different keyboard layout
- Debugging keyboard handling in games and editors
How to use the Keycode Info
- 1
Press a key
Click on the page if needed, then press any key. On a phone, tap the text box first.
- 2
Read the values
See event.key, event.code, keyCode, which, location and modifier keys.
- 3
Copy what you need
Copy a single value or the JavaScript snippet.
- 4
Check the reference
The table lists common keys like Enter (13) and Escape (27).
Examples
Pressing Enter
Key
Enter
Event
event.key "Enter" event.code "Enter" event.keyCode 13
Common errors and how to fix them
keyCode is 229- The keyboard is composing text (common on Android and with IME input). Use the input event instead of keydown there.
A browser shortcut ran instead- Some keys, like Ctrl+W, are reserved by the browser and never reach the page.
More from Web & Network
Free tools that run in your browser — no signup, nothing uploaded.
URL Parser & Query String Parser
Break a URL into protocol, host, path, query parameters and hash.
IP Address Converter
Convert IPv4 between dotted, decimal, hex and binary, and expand IPv6.
HTTP Status Codes List
Every HTTP status code explained in plain English — searchable.
User Agent Parser & Checker
See your user agent and parse any UA string into browser, OS and device.
IP Subnet / CIDR Calculator
Calculate network, broadcast, host range and mask for any IPv4 CIDR.
Meta Tag & Open Graph Generator
Generate SEO meta tags, Open Graph and X card tags with live previews.
Cookie & Set-Cookie Parser
Parse Cookie and Set-Cookie headers into a readable table with security checks.
CORS & Security Headers Generator
Generate CORS and security headers for Nginx, Apache, Express, Next.js and more.
What Is My Screen Resolution?
See your screen resolution, viewport size and device pixel ratio instantly.
Keycode Info FAQ
Use event.key for the character typed (it follows the keyboard layout) and event.code for the physical key position (good for games). keyCode is deprecated but still shown for older code.
On a French AZERTY keyboard, the key left of Z gives event.key "a" but event.code "KeyQ" — code is the position on a US layout, key is the actual character.
Which copy of a key was pressed: 0 standard, 1 left (left Shift), 2 right, 3 numpad.
Its values were never standardised across browsers and layouts. event.key and event.code replace it, but keyCode still works for compatibility.
Enter is 13, Escape is 27 and Space is 32. The arrow keys are 37–40.
No. Everything runs in your browser, so your key presses never leaves your device.
