Keyboard event codes

Press and see · event.key · event.code · keyCode

키보드 이벤트 코드

키를 누르면 event.key · event.code · keyCode 값을 그 자리에서 보여줍니다

아무 키나 눌러보세요
event.key = 입력된 글자(레이아웃 영향 O) · event.code = 물리 키 위치(레이아웃 영향 X) · keyCode 는 폐기된 값입니다.

See the keyboard event code for any key — press one and read event.key, event.code and keyCode straight away. Modifier state and a recent-key log are shown too, so you can check while building key handling.

How to use it

  1. Press any key
  2. Read the three values and the modifier state
  3. Look back over the last 30 presses in the log

Common questions

Should I use key or code?
Use key when the character typed is what matters, and code when the physical key position matters (WASD movement and the like). code stays the same across keyboard layouts.
Why is keyCode greyed out?
It is deprecated in the standard. Refer to it only when maintaining old code; use key and code for anything new.
Some keys do not respond.
Keys like F5 and Ctrl+W are taken by the browser first. A web page cannot intercept those.

Other tools

Stays on your device What you enter is handled inside your browser only — nothing is stored or sent anywhere.

This tool page states where what you enter goes — see the badge above. All tools · KarmoLab · Who made this · Built with AI. View source