Keyboard Event Inspector
Instantly check the key, code, and modifier values of a key press event.
Category: Dev Tools
When to use?
Use it to check the exact key and code values the browser recognizes when implementing shortcuts, or to inspect a special key's event properties.
How to use
- Click the input area in the tool to focus it.
- Press the key you want to check.
- The key, code, keyCode, and modifier values show instantly.
Input Explanation
Click the keyboard test text area to focus it, then press any key to check.
Calculation Basis
It attaches a keydown listener to a DOM element and reads properties like key, code, keyCode, ctrlKey, and shiftKey from the KeyboardEvent in real time.
Usage Examples
- Implement shortcuts - Check the key and code values the browser recognizes to implement shortcuts.
- Quick pre-deploy check - Check inputs and output to reduce errors before dev/ops work.
- Aid docs/reviews - Copy the result into dev docs, issues, or review comments.
Examples
- Enter key → key: "Enter", code: "Enter", keyCode: 13
- Ctrl+A → key: "a", code: "KeyA", ctrlKey: true
Cautions
- Generated output is for reference; test carefully before production use.
- Key events are only displayed and not stored or sent out.
Guides
Inspect keyboard event info
Pressing a key shows event properties like keyCode, key, code, and which in real time. Special keys, combinations (Ctrl+key), and function keys (F1–F12) are shown too.
Use for dev debugging
Use it to find the exact key code when implementing key event listeners. keyCode is being deprecated, so check key and code properties too.
FAQ
Where does it detect events?
It shows the keydown event when the tool's input area is focused.
Are key presses logged?
No. Key events are only displayed, not stored or sent out.
Can I check combination keys?
Combinations with modifier keys like Ctrl, Shift, Alt, Meta are shown as modifier state.
How do key and code differ?
key is the entered character (e.g. a); code is the physical key position (e.g. KeyA), the same regardless of keyboard layout.
Related Tools
- JSON Formatter - Beautify or minify JSON strings instantly and check for validity errors.
- UUID Generator - Generate up to 20 cryptographically secure UUID v4 values at once.
- Password Generator - Generate secure random passwords in the browser by choosing length, character set, and count.
- JWT Decoder - Decode a JWT header and payload to view the JSON and key claims.
- Regex Tester - Enter a regex pattern to see matches in text in real time.
- QR Code Generator - Convert text or a URL into a QR code and download it as an image.