Don't like ads? Go Ad-Free Today

Keycode Info

DeveloperText

Detect JavaScript keycodes, key values, and modifiers instantly. Find keyCode, code, location properties for any pressed key in real-time.

ADVERTISEMENT · REMOVE?

Press a key to get information

Press any key...
Property Value
Key
Keycode
Code
Location
Modifiers
ADVERTISEMENT · REMOVE?

Guide

Keycode Info

Table of Contents

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, or Shift.
  • 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 and a on an AZERTY layout will both return the code KeyQ. 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, and 0 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, or Shift.

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.

ADVERTISEMENT · REMOVE?
Want To enjoy an ad-free experience? Go Ad-Free Today

Install Our Extensions

Add IO tools to your favorite browser for instant access and faster searching

Add to Chrome Extension Add to Edge Extension Add to Firefox Extension Add to Opera Extension
ADVERTISEMENT · REMOVE?
ADVERTISEMENT · REMOVE?
ADVERTISEMENT · REMOVE?

News Corner w/ Tech Highlights

Get Involved

Help us continue providing valuable free tools

Buy me a coffee
ADVERTISEMENT · REMOVE?