Keycode Info
Detect JavaScript keycodes, key values, and modifiers instantly. Find keyCode, code, location properties for any pressed key in real-time.
Guide
This tool is a simple, client-side utility for detecting and displaying properties of any key you press. It’s designed for developers, designers, and anyone who needs to quickly find information about keyboard events. The tool operates in real-time, instantly providing key properties without sending any data over the internet.
How It Works
Simply click anywhere on the page and press a key on your keyboard. The tool captures the keyboard event and shows a breakdown of its properties, including:
- Key: The value of the key, such as
a
,Enter
, orShift
. - Keycode: A numerical value that corresponds to the pressed key. Note: This property is considered deprecated but is still useful for older web applications.
- Code: A physical key identifier that’s not affected by keyboard layout. For example, pressing
q
on a QWERTY layout anda
on an AZERTY layout will both return the codeKeyQ
. This is particularly useful for building games or applications where the physical location of the key matters more than the character it produces. - Location: An integer that specifies the location of the key on the keyboard (e.g.,
1
for left-side keys,2
for right-side keys, and0
for non-located keys). - Modifiers: A list of any modifier keys that are also being held down, such as
Meta
(the Windows or Command key),Alt
,Control
, orShift
.
Use Cases
- Web Development: Quickly debug and test keyboard events for web applications, games, and forms.
- User Interface Design: Determine key combinations for shortcuts and hotkeys.
- Educational Purposes: Learn about how keyboard events are handled in JavaScript and the different properties of a key press.
- Cross-Browser Compatibility: Test how different browsers handle key events and identify potential issues.
Install Our Extensions
Add IO tools to your favorite browser for instant access and faster searching
Must-Try Tools
View All New Arrivals
View AllUpdate: Our latest tool was added on Sep 16, 2025