Keyboard event inspector
Press any key to see its key, code, keyCode, location and modifiers, as JavaScript receives them.
Press a key
Click here
Then press any key. Tab moves on.
Event values
- event.key
(none) - event.code
(none) - event.keyCode
(none) - Location
(none) - Modifiers
(none) - Held down
(none)
Missing a feature or found a bug in Keyboard event inspector? Tell me on X (@_andrewtran) or by email.
How to use Keyboard event inspector
- Select the capture box.
- Press any key or key combination.
- Copy the value you need, such as event.code.
Questions and answers
Is my data sent anywhere?
No. Everything runs in your browser on this device. Nothing you paste is uploaded or stored.
What is the difference between key and code?
key is the character the press produces, so it follows the keyboard layout. code names the physical key, and is the same on every layout.
Why can some shortcuts not be captured?
The browser and the system keep a few for themselves, such as closing the tab. Tab is also left alone, so the keyboard can always leave the box.
Related tools
HTTP status codes
Look up any HTTP status code and what it means, from 200 OK to 504 Gateway Timeout.JSONPath tester
Query JSON with JSONPath: wildcards, recursive search, slices and filters, with live results.JSON diff
Compare two JSON documents by structure, ignoring key order and formatting.cURL converter
Turn a cURL command into fetch, Axios, Python, Go, PHP or HTTPie code.