JavaScript Keycode Tester

Press any key to see its event.key, event.code, keyCode and modifiers — the JavaScript keycode reference.

What is the keycode for Enter in JavaScript?

Enter has event.key "Enter", event.code "Enter" (or "NumpadEnter") and the legacy keyCode 13. Press any key on this page to see all of its keyboard event properties instantly.

How to use the JavaScript Keycode Tester

    Frequently asked questions

    What is the keycode for Space?

    key " ", code "Space", keyCode 32.

    What is the keycode for Escape?

    key "Escape", keyCode 27.

    Does it log my keystrokes?

    No, events stay on this page and are not sent anywhere.