JavaScript Keycode Info
Look up the JavaScript keyCode, event.code, event.key value, keyboard location and category for any key — type a character, key name (Enter, ArrowUp, Shift), event.code, or a numeric keyCode. Runs entirely in your browser.
Input
Type a character, a key name (Enter, ArrowUp, Shift), an event.code (KeyA, ArrowUp), or a numeric keyCode (65).
Output
| Key (event.key) | Description | Key Code | Code (event.code) | Location | Category |
|---|---|---|---|---|---|
| No data yet | |||||
Guides
What this tool does
This tool is a quick reference for JavaScript keyboard event values. Type a key and it shows you the four things you usually need when writing a keydown or keyup handler: the legacy numeric keyCode, the modern event.code (the physical key, layout-independent), the event.key value (the character or named key produced), the location on the keyboard (standard, left, right, or numpad), and a rough category.
If you have used a "press a key to see its code" widget before, this is the same information looked up on demand instead of by pressing a live key. That change is deliberate: the lookup works the same in the browser, from the API, and in scripts, and it lets you check keys you cannot always press (a right-hand modifier, a numpad key on a laptop without a numpad).
How to use it
Type into the single input box. It accepts several kinds of query:
- A character —
a,5,;,/ - A key name —
Enter,ArrowUp,Escape,Shift,CapsLock - An
event.code—KeyA,Digit5,NumpadEnter,ControlLeft - A numeric keyCode —
65,13,27
Results appear instantly as a table, one row per matching key. Because several physical keys can share a number, some lookups return more than one row — searching 13 returns both Enter and Numpad Enter, and searching shift returns both Left Shift and Right Shift, each with its own event.code and location. Use the copy or download button to export the table as CSV.
Why are keyCode and event.code different?
keyCode is the old numeric property (event.keyCode). It is deprecated but still widely seen. event.code is its modern replacement: it names the physical key ("KeyA", "ArrowUp", "NumpadEnter") and does not change with the keyboard layout or modifier state. Prefer event.code for shortcuts that should map to a physical position, and event.key when you care about the character actually produced.
What does "location" mean?
event.location distinguishes otherwise-identical keys. Standard keys report 0; the left and right Shift/Ctrl/Alt/Meta keys report 1 and 2; numpad keys report 3. This tool shows that as Standard / Left / Right / Numpad.
Which keys are covered?
Letters A–Z, digits 0–9, F1–F12, arrows, navigation and editing keys (Home, End, Page Up/Down, Insert, Delete, Backspace), Enter, Tab, Space, Escape, the Shift/Ctrl/Alt/Meta modifiers, Caps/Num/Scroll Lock, common US-layout punctuation, and the full numeric keypad. Values follow the US QWERTY layout; the printed character of punctuation keys can differ on other layouts, but event.code and keyCode stay the same.
Is my input sent anywhere?
No. The lookup table ships with the page and everything runs entirely client-side in your browser — nothing you type is uploaded, logged, or stored.