Keyboard Key Detection Tool

0 (Standard Position)

⌨️

1 (Left Side)

Common Key Code Reference

Letter Keys (A-Z)

AKeyA (65)
BKeyB (66)
CKeyC (67)
DKeyD (68)
EKeyE (69)
FKeyF (70)
GKeyG (71)
HKeyH (72)
IKeyI (73)
JKeyJ (74)
KKeyK (75)
LKeyL (76)
MKeyM (77)
NKeyN (78)
OKeyO (79)
PKeyP (80)
QKeyQ (81)
RKeyR (82)
SKeyS (83)
TKeyT (84)
UKeyU (85)
VKeyV (86)
WKeyW (87)
XKeyX (88)
YKeyY (89)
ZKeyZ (90)

Number Keys (0-9)

0Digit0 (48)
1Digit1 (49)
2Digit2 (50)
3Digit3 (51)
4Digit4 (52)
5Digit5 (53)
6Digit6 (54)
7Digit7 (55)
8Digit8 (56)
9Digit9 (57)

Function Keys (F1-F12)

F1F1 (112)
F2F2 (113)
F3F3 (114)
F4F4 (115)
F5F5 (116)
F6F6 (117)
F7F7 (118)
F8F8 (119)
F9F9 (120)
F10F10 (121)
F11F11 (122)
F12F12 (123)

Arrow Keys

↑ UpArrowUp (38)
↓ DownArrowDown (40)
← LeftArrowLeft (37)
→ RightArrowRight (39)

Modifier Keys

Left ShiftShiftLeft (16)
Right ShiftShiftRight (16)
Left CtrlControlLeft (17)
Ctrl RightControlRight (17)
Alt LeftAltLeft (18)
Alt RightAltRight (18)
Meta LeftMetaLeft (91)
Meta RightMetaRight (92)

Editing Keys

EnterEnter (13)
BackspaceBackspace (8)
DeleteDelete (46)
TabTab (9)
SpaceSpace (32)

Navigation Keys

HomeHome (36)
EndEnd (35)
PageUpPageUp (33)
PageDownPageDown (34)

Special Keys

EscapeEscape (27)
CapsLockCapsLock (20)
InsertInsert (45)
PrintScreenPrintScreen (44)
ScrollLockScrollLock (145)
PausePause (19)

Numeric Keypad

Num 0Numpad0 (96)
Num 1Numpad1 (97)
Num 2Numpad2 (98)
Num 3Numpad3 (99)
Num 4Numpad4 (100)
Num 5Numpad5 (101)
Num 6Numpad6 (102)
Num 7Numpad7 (103)
Num 8Numpad8 (104)
Num 9Numpad9 (105)
Num *NumpadMultiply (106)
Num +NumpadAdd (107)
Num -NumpadSubtract (109)
Num .NumpadDecimal (110)
Num /NumpadDivide (111)
Num EnterNumpadEnter (13)
NumLockNumLock (144)

Punctuation Keys

;Semicolon (186)
=Equal (187)
,Comma (188)
-Minus (189)
.Period (190)
/Slash (191)
`Backquote (192)
[BracketLeft (219)
\Backslash (220)
]BracketRight (221)
'Quote (222)

About the Keyboard Key Detection Tool:

The Keyboard Key Detection Tool helps you quickly obtain JavaScript event properties for any key, including key, code, keyCode, location, and modifier key states.

event.key: Returns the character value of the pressed key, considering keyboard layout and modifier keys (recommended).

event.code: Returns the physical code of the key, unaffected by keyboard layout (recommended).

event.keyCode: Returns the numeric key code, deprecated but still used in many legacy codes.

event.which: Similar to keyCode, deprecated.

event.location: Indicates the key's position on the keyboard (useful for distinguishing left and right keys).

Modifier keys: States of Alt, Ctrl, Shift, and Meta (⌘ or Win key).