Keypress Tester & Keyboard Event Viewer

Press any key to inspect event.key, event.code, keyCode, modifiers, keydown or keyup data, and a copyable event history.

Live Keypress Tester & Keyboard Event Viewer

Choose which browser event to capture, press a key, and inspect the complete KeyboardEvent data. Your last eight events stay in a local history for quick comparisons.

Capture

Current key

Waiting…

Press any key to capture keydown

event.type

keydown or keyup

event.key

Character or named key

event.code

Physical keyboard position

event.keyCode

Deprecated numeric value

event.which

Legacy numeric alias

event.location

Standard, left, right, or numpad

event.repeat

True while a key is held

Modifier keys

Shift, Ctrl, Alt, and Meta

Recent Events

Latest 8 events
TypeKeyCodeModifiersRepeat
Press a key to populate the event history.

Understanding KeyboardEvent Values

event.key describes the character or named key produced by the input. Use it when the meaning of the key matters, such as Enter, Escape, or a typed letter.

event.code describes the physical keyboard position. It is useful for layout-independent controls such as games. event.keyCode and event.which are deprecated numeric values shown here for debugging older code.

The live viewer also exposes event type, location, repeat status, and modifier keys. Switch between keydown and keyup, compare recent events, or copy the current snapshot as JSON.

Read the keyboard event guides