DevToys Web Pro iconDevToys Web ProBlog
Prevedeno uz LocalePack logoLocalePack
Ocijenite nas:
Isprobajte proširenje preglednika:

Keyboard Keycode Viewer

Press any key

Keyboard events will be captured here

Tehnički detalji

Keyboard Keycode Viewer

What it does

This tool captures keyboard events in real time and displays every property exposed by the browser's KeyboardEvent interface. Press any key — including modifiers, function keys, arrow keys, and numpad keys — to see its exact values.

Use cases

Use this tool to debug keyboard event handlers in JavaScript applications, identify the correct property to use when mapping shortcuts, verify cross-platform key codes, or understand how modifier keys affect the reported values.

Key properties explained

event.key is the recommended modern property — it returns a human-readable string like "a", "Enter", or "ArrowUp" and reflects the active keyboard layout. event.code identifies the physical key position (e.g. "KeyA", "Numpad0") and is layout-independent. event.keyCode and event.which are numeric legacy properties that are deprecated.

Modifier keys and location

The ctrlKey, shiftKey, altKey, and metaKey booleans indicate whether modifier keys were held during the press. The location property distinguishes left vs right modifier keys and numpad keys from their main-keyboard equivalents.