Skip to content
OnlineToolStudio

Keycode Finder

runs in your browserno sign-upfree

Press any key to see its JavaScript event.key, event.code and keyCode, with modifiers and a ready-to-copy key handler — plus a searchable key code table.

Press any key

You’ll see its key, code and keyCode — with modifiers like Ctrl and Shift, too.

Key code table

Keyevent.keyevent.codekeyCode
Backspace"Backspace"Backspace8
Tab"Tab"Tab9
Enter"Enter"Enter13
Shift"Shift"ShiftLeft / ShiftRight16
Ctrl"Control"ControlLeft / ControlRight17
Alt / Option"Alt"AltLeft / AltRight18
Pause"Pause"Pause19
Caps Lock"CapsLock"CapsLock20
Escape"Escape"Escape27
Space" "Space32
Page Up"PageUp"PageUp33
Page Down"PageDown"PageDown34
End"End"End35
Home"Home"Home36
Arrow Left"ArrowLeft"ArrowLeft37
Arrow Up"ArrowUp"ArrowUp38
Arrow Right"ArrowRight"ArrowRight39
Arrow Down"ArrowDown"ArrowDown40
Print Screen"PrintScreen"PrintScreen44
Insert"Insert"Insert45
Delete"Delete"Delete46
0"0"Digit048
1"1"Digit149
2"2"Digit250
3"3"Digit351
4"4"Digit452
5"5"Digit553
6"6"Digit654
7"7"Digit755
8"8"Digit856
9"9"Digit957
A"a"KeyA65
B"b"KeyB66
C"c"KeyC67
D"d"KeyD68
E"e"KeyE69
F"f"KeyF70
G"g"KeyG71
H"h"KeyH72
I"i"KeyI73
J"j"KeyJ74
K"k"KeyK75
L"l"KeyL76
M"m"KeyM77
N"n"KeyN78
O"o"KeyO79
P"p"KeyP80
Q"q"KeyQ81
R"r"KeyR82
S"s"KeyS83
T"t"KeyT84
U"u"KeyU85
V"v"KeyV86
W"w"KeyW87
X"x"KeyX88
Y"y"KeyY89
Z"z"KeyZ90
Windows / ⌘ (left)"Meta"MetaLeft91
Windows / ⌘ (right)"Meta"MetaRight92
Context menu"ContextMenu"ContextMenu93
Numpad 0"0"Numpad096
Numpad 1"1"Numpad197
Numpad 2"2"Numpad298
Numpad 3"3"Numpad399
Numpad 4"4"Numpad4100
Numpad 5"5"Numpad5101
Numpad 6"6"Numpad6102
Numpad 7"7"Numpad7103
Numpad 8"8"Numpad8104
Numpad 9"9"Numpad9105
Numpad *"*"NumpadMultiply106
Numpad +"+"NumpadAdd107
Numpad -"-"NumpadSubtract109
Numpad ."."NumpadDecimal110
Numpad /"/"NumpadDivide111
F1"F1"F1112
F2"F2"F2113
F3"F3"F3114
F4"F4"F4115
F5"F5"F5116
F6"F6"F6117
F7"F7"F7118
F8"F8"F8119
F9"F9"F9120
F10"F10"F10121
F11"F11"F11122
F12"F12"F12123
Num Lock"NumLock"NumLock144
Scroll Lock"ScrollLock"ScrollLock145
Semicolon ;";"Semicolon186
Equals ="="Equal187
Comma ,","Comma188
Minus -"-"Minus189
Period ."."Period190
Slash /"/"Slash191
Backquote `"`"Backquote192
Bracket ["["BracketLeft219
Backslash \"\\"Backslash220
Bracket ]"]"BracketRight221
Quote '"'"Quote222

100 of 100 keys · US layout — on other layouts, punctuation keys can give other characters and codes.

About this tool

Press any key and see exactly what a JavaScript keyboard event reports: event.key (the character or key name, such as "a", "A" or "Enter"), event.code (the physical key, such as "KeyA"), the old numeric keyCode and which, the key’s location (left or right Shift, numpad) and which modifiers were held. Copy any value, or copy a ready-made keydown handler. Below, a searchable table lists the key codes of every common key.

How to use

  1. Press any key on your keyboard (on a phone, tap the box to open the keyboard).
  2. Read or copy event.key, event.code and keyCode — hold Ctrl, Shift, Alt or ⌘ to see modifiers.
  3. Copy the JavaScript snippet, or search the table for a key you can’t press right now.

FAQ

Should I use event.key, event.code or keyCode?

Use event.key for what the user typed or meant (shortcuts like Ctrl+S, Enter to submit) — it respects the keyboard layout. Use event.code for physical positions, such as WASD game controls that should stay in place on AZERTY keyboards. keyCode and which are deprecated: they still work, but avoid them in new code.

What is the keycode for Enter, Escape or Space?

Enter is 13, Escape is 27 and Space is 32 (their event.key values are "Enter", "Escape" and " "). The arrow keys are 37–40, the letters 65–90 and F1–F12 are 112–123 — search the table for any other key.

Why does my phone show keyCode 229 or “Unidentified”?

Many on-screen keyboards (and input methods for languages like Chinese or Japanese) compose text before it is typed, so keydown reports 229 / "Unidentified". Listen for the input event instead when you need the typed character on mobile.

Why don’t some shortcuts show up?

The browser or operating system keeps some keys for itself — for example Ctrl/⌘+W, Ctrl/⌘+T or Alt+Tab — so a web page never receives them.

Related tools

All tools