Documentation
    Preparing search index...

    Interface SurfaceKeyEvent

    The one thing a SceneKeyEvent needs from the platform event behind it: a way to suppress the host's own reaction to the keystroke.

    Structural and optional, for this package's usual reason — a browser KeyboardEvent, a Playwright-synthesized one, and a plain object in a unit test are all equally acceptable, and naming KeyboardEvent would pull a DOM lib into a package that must build in Node.

    interface SurfaceKeyEvent {
        altKey: boolean;
        code: string;
        ctrlKey: boolean;
        key: string;
        metaKey: boolean;
        repeat: boolean;
        shiftKey: boolean;
        preventDefault?(): void;
    }

    Hierarchy (View Summary)

    Index
    altKey: boolean

    Whether Alt was held.

    code: string

    The physical key, layout-independent — "KeyA", "Space".

    ctrlKey: boolean

    Whether Control was held.

    key: string

    The character or named key produced — "a", "Enter", " ".

    metaKey: boolean

    Whether Meta (Command, Windows) was held.

    repeat: boolean

    Whether the platform's auto-repeat produced this event.

    shiftKey: boolean

    Whether Shift was held.