Key Code Tester

Press any key on your keyboard to instantly inspect JavaScript key properties, values, and modifier states.

Listening for KeyEvents...

Event.keyCode

?
Click here or press any key on your keyboard
event.key
-

The value of the key pressed.

event.code
-

Physical key on the keyboard.

event.location
-

Key location (0: standard, 1: left, 2: right, 3: numpad).

event.which / keyCode
-

Legacy numeric code identifier.

Modifier States

Shift
Ctrl
Alt
Meta (Cmd)

Recent Key History

0 events recorded
No keys pressed yet...

About Keyboard Event Inspection

Learn how JavaScript manages keyboard events, codes, and legacy standards.

Real-time Debugging

Handling user input across different layouts and physical keyboards requires precise inspection of JavaScript keyboard events. This utility provides deep insight into every keystroke event property to help developers construct robust shortcuts, gaming controls, and form handlers.

Key

Character Value (key)

Returns the printed character value generated by the key, respecting modifier states like shift.

Code

Physical Layout (code)

Identifies the physical key on the keyboard independent of current language layout or modifier state.

Legacy

Legacy keyCode Support

Inspects deprecated numeric key codes to maintain compatibility with legacy codebase systems.

Privacy

100% Browser Local

All keyboard inputs are captured locally in your current browser window with zero telemetry tracking.

Modifiers

Modifier Key Tracking

Real-time status indicators for Shift, Control, Alt, and Meta (Command/Windows) keys during combinations.

Accuracy

Key Location Mapping

Differentiates between duplicated keyboard keys such as left versus right Shift or Numpad keys.

UtilityGlen

Handy web tools for daily use. Everything runs right in your browser—no sign-ups, no cloud uploads, and your data stays entirely on your device.