Keycode info
Find the javascript keycode, code, location and modifiers of any pressed key
Meta
Press the key on your keyboard you want to get info about this key
Note:This tool captures keyboard events and displays the JavaScript KeyboardEvent properties. The keyCode property is deprecated but still widely used. Modern code should use the "code" or "key" property instead. Location indicates the physical position of the key (0 = standard, 1 = left, 2 = right, 3 = numpad).
About this tool
Use it to
- Debug keyboard event handlers in web applications
- Identify key codes for custom keyboard shortcuts
- Test keyboard event properties across different browsers
- Learn the difference between key, keyCode, and code properties
- Standard Keys
- Press letter keys (A-Z) to see key codes 65-90, or number keys to see codes 48-57.
- Special Keys
- Press Enter (13), Escape (27), Space (32), or arrow keys to see their unique codes.
Related tools
- Regex cheatsheet
Javascript Regex/Regular Expression cheatsheet
- URL Encode
Encode text to URL-safe format
- URL Decode
Decode URL-encoded strings
- HTML Escape
Escape special characters to HTML entities