Keyboard Event Viewer
View detailed information about keyboard events including key, code, keyCode, and location. Developer debugging tool.
Press any key on your keyboard to see its details
About Keyboard Events
Keyboard events in web development provide information about user interactions with the keyboard. Understanding these events is crucial for building accessible web applications, implementing keyboard shortcuts, and handling special keys. Each keyboard event contains multiple properties that describe the key press in different ways.
The key property represents the value of the key pressed (e.g., "Enter", "a", "Shift"), while the code property represents the physical key on the keyboard (e.g., "KeyA", "Enter", "Space"). The which or keyCode property provides a numeric code, though it's deprecated in favor of the key andcode properties.
The location property indicates where the key is located on the keyboard: standard keys, left/right modifier keys, or the numpad. This information is essential for implementing keyboard shortcuts, accessibility features, and handling special keys like function keys that might trigger browser actions.