@cartridge-engine/keyboard-engine
    Preparing search index...

    Interface PageBoundKeyEntry

    A key binding registered on a page (screen) layer.

    Extends BaseBoundKeyEntry with the page-only stopsWorkingAfterLayerAppearing option.

    interface PageBoundKeyEntry {
        handler: KeyHandler;
        keys: string[];
        mode?: string;
        observer?: (remaining: number) => void;
        pressCount?: number;
        stopsWorkingAfterLayerAppearing?: boolean;
        times?: number;
        when?: string | (() => boolean);
    }

    Hierarchy (View Summary)

    Index
    handler: KeyHandler

    Handler to invoke on match.

    keys: string[]

    Normalized key names to match.

    mode?: string

    Restrict this binding to a specific mode.

    Copied from BoundKeyboardOptions.mode at registration time. Checked by tryMatchBindings before when, onlyThis, and key-match evaluation. When the active mode does not match, the binding is skipped entirely.

    observer?: (remaining: number) => void

    Callback invoked on every key press while counting toward times. Receives the number of remaining presses before the handler fires. Requires times to be set; throws at registration otherwise.

    pressCount?: number

    Current press count. Managed internally by the keyboard provider.

    stopsWorkingAfterLayerAppearing?: boolean

    When true, this binding stops responding after its owning layer has appeared on screen. The binding is only active before the layer renders for the first time — once the layer becomes visible, any subsequent key presses matching this entry are silently ignored.

    times?: number

    Number of presses needed before the handler fires (from options).

    when?: string | (() => boolean)

    Optional condition callback. When provided, the binding only fires if this callback returns true at the moment of the key press.

    When false, the binding is skipped as if it does not exist — the event continues to the next binding or layer.