Keycode Info

Discover JavaScript key codes, event properties, and keyboard information

Keycode Tester

Press any key to see its information
⌨️
Press a key
Key
-
Code
-
KeyCode
-
Location
-
Modifiers
-
CharCode
-

Event Properties

Property Value
Press a key to see event properties

Keycode Reference

Special Keys

Enter
Enter
Escape
Escape
Backspace
Backspace
Tab
Tab
Space
Space
Delete
Delete
Shift
ShiftLeft/ShiftRight
Control
ControlLeft/ControlRight
Alt
AltLeft/AltRight
Meta
MetaLeft/MetaRight
CapsLock
CapsLock
ContextMenu
ContextMenu

Navigation Keys

ArrowUp
ArrowDown
ArrowLeft
ArrowRight
Home
Home
End
End
PageUp
PageUp
PageDown
PageDown

Function Keys

F1
F1
F2
F2
F3
F3
F4
F4
F5
F5
F6
F6
F7
F7
F8
F8
F9
F9
F10
F10
F11
F11
F12
F12

About Keyboard Events

  • key: The value of the key pressed (recommended)
  • code: Physical key on keyboard (useful for game controls)
  • keyCode: Deprecated - numeric code for the key
  • location: Where the key is on the keyboard (0: Standard, 1: Left, 2: Right, 3: Numpad)
  • Modifiers: Shows which modifier keys (Shift, Ctrl, Alt, Meta) are pressed

How to use this Keycode Tester:

  • Press any key on your keyboard to see its information
  • Click on reference keys to simulate pressing them
  • See all event properties in the table below the key display
  • Note that keyCode and charCode are deprecated in modern browsers
  • Use the 'key' or 'code' properties for new development

All key testing happens in your browser - we never store or transmit your keystrokes