KeyboardEvent
The sample shows Shift+A with key A and code KeyA. Event timestamps use milliseconds relative to the pageโs time origin.
Preparing your comprehensive developer toolkit
Practical Guide
Inspect key, code, location, modifiers and repeat in your browser. Compare modern KeyboardEvent values with legacy keyCode and which.
A keyboard event describes the key the browser received and its current modifier state. The values help diagnose shortcut and layout behavior.
The sample shows Shift+A with key A and code KeyA. Event timestamps use milliseconds relative to the pageโs time origin.
The inspector reads events only while its capture area has focus. Key presses keep their normal browser behavior.
Compare the events a shortcut receives before and after switching keyboard layouts.
key describes the input value after the keyboard layout and modifiers are applied. code usually identifies a physical key position. keyCode and which are legacy fields.
The tool processes your input in the current browser session.
W3C specification for keyboard events and their fields.
Browser API reference for KeyboardEvent properties.
Open the tool to try these features.