Start a project

Tool 280 of 425 · Input events

Keyboard Event Viewer

Shows every property of keyboard events as you type and writes the matching listener code.

Keyboard Event Viewer

Your input

Result

TypekeycodekeyCodelocationModifiersRepeatComposing
Listener code

    01

    What it does

    Shows every property of keyboard events as you type and writes the matching listener code.

    • key, code, keyCode and location
    • Modifier and repeat flags
    • keyup option
    • IME composition shown

    02

    Private by design

    Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

    03

    What you get

    An event log and code, with a Copy and a Download button on every result.

    • KeyboardEvent
    • event.key
    • JavaScript

    Why it matters

    Shortcuts break on non-UK layouts when code uses keyCode or the wrong property.

    event.key is the character typed; event.code is the physical key. This shows both.

    How to use it

    1. Type or paste your input; the example shows the format.
    2. Press Start viewer. Results also update as you type.
    3. Read the summary line, then the table, notes or output below it.
    4. Copy or download what you need. Nothing leaves this page.

    FAQ

    key or code?

    key for text and shortcuts by letter; code for games using physical positions.

    Why is keyCode deprecated?

    It's inconsistent across layouts and browsers. Use key or code.

    Is my input uploaded?

    No. The tool runs in your browser and nothing you type, paste or open is sent anywhere.

    Can I rely on the result?

    It follows the public specification or formula named on this page and says where it simplifies. Check anything critical against the official tool or documentation before you ship it.

    Work with me

    Want a site that gets these right?

    I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

    All developer tools · Back to leej.uk