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

    Interface MappingKeyEntry<TComponent>

    A registered mapping key: an external key sequence (keys) that triggers a target composition chain (target) when fully typed.

    interface MappingKeyEntry<TComponent> {
        affectOverlay?: boolean;
        category?: "*" | TComponent[];
        exclusive?: boolean;
        executeWhenNoOverlay?: boolean;
        KeyReleaseWhenChainInterrupted?: boolean;
        keys: string[];
        mode?: string;
        target: string[];
        timeout?: number;
        when?: string | (() => boolean);
    }

    Type Parameters

    • TComponent

    Hierarchy

    Index
    affectOverlay?: boolean

    Which pipeline phase this entry fires in: true = layer phase (before the layer broadcast), false = page phase (after the layer broadcast, before the screen stack).

    category?: "*" | TComponent[]

    Top-component whitelist: "*" or omitted = all screens; [] = no screens (effectively disabled); [A, B] = only when the stack top is exactly A or B.

    exclusive?: boolean

    When true, keys that break the pending mapping sequence are silently consumed and the sequence keeps waiting.

    executeWhenNoOverlay?: boolean

    When true, an overlay-phase entry (affectOverlay: true) fires even while no layer is open. With the default false, the entry is skipped when no layers exist. Only relevant when affectOverlay is true.

    KeyReleaseWhenChainInterrupted?: boolean

    When true, if the target composition chain is interrupted (any target key fails to resolve / execute), the final key that broke the sequence is swallowed silently instead of being released to lower pipeline stages. Mirrors CompositionKey.KeyReleaseWhenChainInterrupted.

    keys: string[]

    External key sequence the user must type (e.g. ["g", "i"]).

    mode?: string

    Restrict the entry to a specific mode. When the active mode does not match, the entry is skipped. Omitted = fires in all modes.

    target: string[]

    Internal composition keys to execute in order.

    timeout?: number

    Timeout for the next key in the sequence, in milliseconds.

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

    The entry is enabled only while this callback (or named condition id) returns true. Evaluated while filtering candidates, so an entry whose gate is closed is skipped before resolution — a sibling entry for the same key whose gate is open can still match.