Keycode info
Find the javascript keycode, code, location and modifiers of any pressed key.
Press any key
Press the key on your keyboard you want to get info about this key
Recent keys:
About Keycode Info
This tool helps web developers identify the various properties and values of keyboard events in JavaScript, which is essential for implementing keyboard shortcuts, accessibility features, and interactive web applications.
JavaScript provides several keyboard event properties:
- key - Returns the character or non-character key value (e.g., "A", "Enter", "Escape")
- keyCode - Returns the Unicode value of the key (deprecated but still widely used)
- code - Returns the physical key code (e.g., "KeyA", "Enter", "Escape")
- location - Returns the location of the key on the keyboard (0 for standard, 1 for left, 2 for right, 3 for numpad)
- altKey, ctrlKey, shiftKey, metaKey - Boolean values indicating if modifier keys are pressed
- Implementing keyboard shortcuts and hotkeys in web applications
- Creating web-based games with keyboard controls
- Building accessible web interfaces with keyboard navigation
- Implementing form validation and input restrictions
- Developing interactive code editors and text manipulation tools
Using Modern Properties
The keyCode property is deprecated. It's recommended to use key or code properties instead for more reliable and semantically meaningful keyboard event handling.
Key vs Code
Use key when you care about the character being typed, and code when you care about the physical key position regardless of keyboard layout.
Accessibility Considerations
Always provide alternative ways to access functionality that uses keyboard shortcuts, and avoid conflicts with browser and screen reader keyboard shortcuts.
Related Tools
You might also find these useful

Basic Auth Generator
Generate basic authentication credentials for HTTP requests.

Device Information
Get information about your device including the operating system, browser, and more.

HTTP Status Codes
Complete reference guide for HTTP status codes with meanings, examples, and best practices.

JSON XML Converter
Convert JSON to XML format easily. Transform data between these popular formats with this free online tool.

JSON TOML Converter
Convert JSON to TOML format easily. Transform data between these popular formats with this free online tool.

JSON Formatter
Format and beautify JSON with customizable indentation. Supports JSON5, comments, trailing commas and advanced formatting options.