자바스크립트 키코드 찾기

Press any key on your keyboard to see its JavaScript event properties.

Ad Space
Press any key…
Ad Space

Key History

No keys pressed yet

How It Works

  1. Press any key: Click in the input area and press any key on your keyboard — letters, numbers, function keys, arrows, modifiers, or special keys.
  2. Read the key codes: The tool instantly displays the key's event.key, event.code, event.keyCode (legacy), and charCode values.
  3. Use in your code: Copy the exact values you need for your keyboard event listeners or shortcut implementations.

Why Use Keycode Finder?

JavaScript keyboard events expose several different properties — key, code, keyCode, charCode, and which — and knowing which to use and what value to compare against is consistently tricky. The KeyCode Finder eliminates guesswork by letting you press a key and immediately see all its event properties. This is invaluable for building keyboard shortcuts, handling special keys, implementing hotkeys, and debugging keyboard event listeners.

Features

Frequently Asked Questions

What is the difference between event.key and event.keyCode?

event.key is the modern standard — it returns a readable string like "ArrowLeft" or "Enter". event.keyCode is a legacy numeric code (deprecated but still supported). Use event.key for new code; use event.keyCode when maintaining older browser compatibility.

How do I detect Ctrl+S or other key combinations?

Keyboard combinations use event.key combined with modifier checks: if (event.ctrlKey && event.key === "s"). Press Ctrl+S in this tool to see all the values, then replicate the exact condition in your event listener.

Why do some keys show the same keyCode?

keyCode values were not standardized and some keys share codes depending on context. event.code is more reliable — it identifies the physical key position (e.g., "KeyA") regardless of the keyboard layout, while event.key reflects what character that key produces.

Related Tools