Skip to content
UniKit

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).

Press any key…

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.

KeycodekeyCodeGroup
AKeyA65Letters
BKeyB66Letters
CKeyC67Letters
DKeyD68Letters
EKeyE69Letters
FKeyF70Letters
GKeyG71Letters
HKeyH72Letters
IKeyI73Letters
JKeyJ74Letters
KKeyK75Letters
LKeyL76Letters
MKeyM77Letters
NKeyN78Letters
OKeyO79Letters
PKeyP80Letters
QKeyQ81Letters
RKeyR82Letters
SKeyS83Letters
TKeyT84Letters
UKeyU85Letters
VKeyV86Letters
WKeyW87Letters
XKeyX88Letters
YKeyY89Letters
ZKeyZ90Letters
0Digit048Digits
1Digit149Digits
2Digit250Digits
3Digit351Digits
4Digit452Digits
5Digit553Digits
6Digit654Digits
7Digit755Digits
8Digit856Digits
9Digit957Digits
F1F1112Function
F2F2113Function
F3F3114Function
F4F4115Function
F5F5116Function
F6F6117Function
F7F7118Function
F8F8119Function
F9F9120Function
F10F10121Function
F11F11122Function
F12F12123Function
ArrowLeftArrowLeft37Navigation
ArrowUpArrowUp38Navigation
ArrowRightArrowRight39Navigation
ArrowDownArrowDown40Navigation
EscapeEscape27Navigation
TabTab9Navigation
CapsLockCapsLock20Navigation
EnterEnter13Navigation
SpaceSpace32Navigation
BackspaceBackspace8Navigation
DeleteDelete46Navigation
InsertInsert45Navigation
HomeHome36Navigation
EndEnd35Navigation
PageUpPageUp33Navigation
PageDownPageDown34Navigation
PrintScreenPrintScreen44Navigation
ScrollLockScrollLock145Navigation
PausePause19Navigation
NumLockNumLock144Navigation
0Numpad096Numpad
1Numpad197Numpad
2Numpad298Numpad
3Numpad399Numpad
4Numpad4100Numpad
5Numpad5101Numpad
6Numpad6102Numpad
7Numpad7103Numpad
8Numpad8104Numpad
9Numpad9105Numpad
EnterNumpadEnter13Numpad
*NumpadMultiply106Numpad
+NumpadAdd107Numpad
-NumpadSubtract109Numpad
.NumpadDecimal110Numpad
/NumpadDivide111Numpad
ShiftShiftLeft16Modifiers
ShiftShiftRight16Modifiers
ControlControlLeft17Modifiers
ControlControlRight17Modifiers
AltAltLeft18Modifiers
AltAltRight18Modifiers
MetaMetaLeft91Modifiers
MetaMetaRight92Modifiers
ContextMenuContextMenu93Modifiers
;Semicolon186Symbols
=Equal187Symbols
,Comma188Symbols
-Minus189Symbols
.Period190Symbols
/Slash191Symbols
`Backquote192Symbols
[BracketLeft219Symbols
\Backslash220Symbols
]BracketRight221Symbols
'Quote222Symbols

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键盘修饰键速查表

Related tools