Keycode info
Press any key to inspect key, code, keyCode, which, modifier state and key location, plus the raw event table and a common key reference.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Capture
Click the area below and press any key (the listener is on the window, so any key works).
Key info
No key captured yet
Raw event data
Press a key to see the raw event properties.
Common key reference
Frequently used keys with their keyCode: letters, digits, function keys, navigation keys, the numpad, modifiers and symbol keys.
| Key | code | keyCode | Group |
|---|---|---|---|
| A | KeyA | 65 | Letters |
| B | KeyB | 66 | Letters |
| C | KeyC | 67 | Letters |
| D | KeyD | 68 | Letters |
| E | KeyE | 69 | Letters |
| F | KeyF | 70 | Letters |
| G | KeyG | 71 | Letters |
| H | KeyH | 72 | Letters |
| I | KeyI | 73 | Letters |
| J | KeyJ | 74 | Letters |
| K | KeyK | 75 | Letters |
| L | KeyL | 76 | Letters |
| M | KeyM | 77 | Letters |
| N | KeyN | 78 | Letters |
| O | KeyO | 79 | Letters |
| P | KeyP | 80 | Letters |
| Q | KeyQ | 81 | Letters |
| R | KeyR | 82 | Letters |
| S | KeyS | 83 | Letters |
| T | KeyT | 84 | Letters |
| U | KeyU | 85 | Letters |
| V | KeyV | 86 | Letters |
| W | KeyW | 87 | Letters |
| X | KeyX | 88 | Letters |
| Y | KeyY | 89 | Letters |
| Z | KeyZ | 90 | Letters |
| 0 | Digit0 | 48 | Digits |
| 1 | Digit1 | 49 | Digits |
| 2 | Digit2 | 50 | Digits |
| 3 | Digit3 | 51 | Digits |
| 4 | Digit4 | 52 | Digits |
| 5 | Digit5 | 53 | Digits |
| 6 | Digit6 | 54 | Digits |
| 7 | Digit7 | 55 | Digits |
| 8 | Digit8 | 56 | Digits |
| 9 | Digit9 | 57 | Digits |
| F1 | F1 | 112 | Function |
| F2 | F2 | 113 | Function |
| F3 | F3 | 114 | Function |
| F4 | F4 | 115 | Function |
| F5 | F5 | 116 | Function |
| F6 | F6 | 117 | Function |
| F7 | F7 | 118 | Function |
| F8 | F8 | 119 | Function |
| F9 | F9 | 120 | Function |
| F10 | F10 | 121 | Function |
| F11 | F11 | 122 | Function |
| F12 | F12 | 123 | Function |
| ArrowLeft | ArrowLeft | 37 | Navigation |
| ArrowUp | ArrowUp | 38 | Navigation |
| ArrowRight | ArrowRight | 39 | Navigation |
| ArrowDown | ArrowDown | 40 | Navigation |
| Escape | Escape | 27 | Navigation |
| Tab | Tab | 9 | Navigation |
| CapsLock | CapsLock | 20 | Navigation |
| Enter | Enter | 13 | Navigation |
| Space | Space | 32 | Navigation |
| Backspace | Backspace | 8 | Navigation |
| Delete | Delete | 46 | Navigation |
| Insert | Insert | 45 | Navigation |
| Home | Home | 36 | Navigation |
| End | End | 35 | Navigation |
| PageUp | PageUp | 33 | Navigation |
| PageDown | PageDown | 34 | Navigation |
| PrintScreen | PrintScreen | 44 | Navigation |
| ScrollLock | ScrollLock | 145 | Navigation |
| Pause | Pause | 19 | Navigation |
| NumLock | NumLock | 144 | Navigation |
| 0 | Numpad0 | 96 | Numpad |
| 1 | Numpad1 | 97 | Numpad |
| 2 | Numpad2 | 98 | Numpad |
| 3 | Numpad3 | 99 | Numpad |
| 4 | Numpad4 | 100 | Numpad |
| 5 | Numpad5 | 101 | Numpad |
| 6 | Numpad6 | 102 | Numpad |
| 7 | Numpad7 | 103 | Numpad |
| 8 | Numpad8 | 104 | Numpad |
| 9 | Numpad9 | 105 | Numpad |
| Enter | NumpadEnter | 13 | Numpad |
| * | NumpadMultiply | 106 | Numpad |
| + | NumpadAdd | 107 | Numpad |
| - | NumpadSubtract | 109 | Numpad |
| . | NumpadDecimal | 110 | Numpad |
| / | NumpadDivide | 111 | Numpad |
| Shift | ShiftLeft | 16 | Modifiers |
| Shift | ShiftRight | 16 | Modifiers |
| Control | ControlLeft | 17 | Modifiers |
| Control | ControlRight | 17 | Modifiers |
| Alt | AltLeft | 18 | Modifiers |
| Alt | AltRight | 18 | Modifiers |
| Meta | MetaLeft | 91 | Modifiers |
| Meta | MetaRight | 92 | Modifiers |
| ContextMenu | ContextMenu | 93 | Modifiers |
| ; | Semicolon | 186 | Symbols |
| = | Equal | 187 | Symbols |
| , | Comma | 188 | Symbols |
| - | Minus | 189 | Symbols |
| . | Period | 190 | Symbols |
| / | Slash | 191 | Symbols |
| ` | Backquote | 192 | Symbols |
| [ | BracketLeft | 219 | Symbols |
| \ | Backslash | 220 | Symbols |
| ] | BracketRight | 221 | Symbols |
| ' | Quote | 222 | Symbols |
What this tool does
- Build keyboard shortcuts and confirm which value the browser actually gives you: key is the character, code is the physical key — use code for games and layout-independent shortcuts.
- Diagnose keys that behave differently per keyboard: the left and right Shift have code ShiftLeft and ShiftRight, and location labels standard, left, right or numpad.
- Check that combinations are detected correctly: the Ctrl / Alt / Shift / Meta state is rendered as "Ctrl + Shift" and auto-repeat shows up too.
- Look up keyCodes for common keys with the built-in reference sorted by keyCode, covering letters, digits, function keys, navigation, the numpad, modifiers and symbols.
Example
Input
Press Shift + A on the page (capital A)
Output
key: A code: KeyA keyCode: 65 which: 65 location: 0 · Standard modifiers: Shift repeat: No
key changes with Shift (capital A) while code stays KeyA. keyCode and which are deprecated but still widely read, so they are shown as well.
Frequently asked questions
Should I use key or code?
key is the character the user produced, affected by Shift, IME and keyboard layout. code is the physical position, identical on every keyboard of the same layout. Use code (KeyA, Digit1, NumpadEnter) for games and shortcut systems, and key for text input handling.
keyCode and which are deprecated — why show them?
They were never removed from browsers: Chrome and Safari still populate them and plenty of legacy code and libraries read event.keyCode. Write new code against key and code; these are displayed to help you match old behaviour.
Why are the keyCodes for digits and letters consecutive?
keyCode follows the old Windows virtual-key codes: A–Z are 65–90, top-row digits 0–9 are 48–57 and numpad digits are 96–105. So the same "1" is 49 on the top row and 97 on the numpad — different positions, different codes.
What changes with modifiers or an active IME?
With Ctrl / Alt / Meta the browser usually suppresses text input, so key may be "a" or empty. During IME composition (Chinese, Japanese) composition events fire first; this page listens to keydown, so you see the raw key.
Are my keystrokes recorded or uploaded?
No. Key data lives in the current page memory only for rendering, no network request is made, and nothing is written to local storage. A refresh clears it.
Keywords:keycode按键信息keycodewhichkeyboard event键盘修饰键速查表