devShakib

Loading devShakib…

Keycode Tester

Press any key to see its label, code and key ID. Free, runs entirely in your browser — no signup, and nothing you paste in is uploaded.

Keyboard events carry several different identifiers and picking the wrong one is the usual source of shortcuts that work on one machine and not another. `key` is the character produced, which changes with layout and modifiers; `code` is the physical position on the keyboard, which does not.

That distinction decides the behaviour you get. A shortcut bound to `code` sits in the same place on a QWERTY and an AZERTY board but may be a different letter; one bound to `key` follows the letter wherever the layout moved it. The legacy `keyCode` number is deprecated and inconsistent across browsers, and is worth reading only when maintaining code that already depends on it.