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

    Interface PipelineContext<TComponent>

    Snapshot of all mutable state needed to process a single key event through the keyboard pipeline.

    Created once per event by KeyboardEngine.buildPipelineContext. Immutable snapshot fields reflect the state at the moment the event arrived; mutable coordination fields allow cross-processor communication within a single pipeline run.

    interface PipelineContext<TComponent> {
        allLayers: KeyboardLayer[];
        allModalLayers: KeyboardLayer[];
        autoTab: boolean;
        autoTabKey: string;
        compositionEngine: CompositionEngine;
        compositionEngineHandler: boolean;
        conditions: Map<string, boolean>;
        currentMode: string | null;
        eventNames: string[];
        globalKeys: ResolvedGlobalKeyEntry[];
        globalSequences: ResolvedGlobalSequenceEntry[];
        input: string;
        isNormalChar: (key: unknown) => boolean;
        key: unknown;
        layerKeyboardRefs: Map<string, LayerKeyboardLayer>;
        layersRef: Map<unknown, PageKeyboardLayer>;
        noActiveProcessor: string[];
        notifyFocusChange: () => void;
        notifyPendingSyncs: () => void;
        pagePath: TComponent[];
        pendingSeqRef: MutableRef<GlobalPendingSequence | null>;
        topComponent: TComponent | null;
        wildcardFirst: boolean;
    }

    Type Parameters

    • TComponent
    Index
    allLayers: KeyboardLayer[]

    Snapshot of all open non-modal layers.

    allModalLayers: KeyboardLayer[]

    Snapshot of all open modal layers.

    autoTab: boolean

    Whether the engine auto-handles Tab/Shift+Tab for focus rotation.

    autoTabKey: string

    Key name used for Tab auto-focus rotation.

    compositionEngine: CompositionEngine

    The shared composition engine instance.

    compositionEngineHandler: boolean

    Whether a composition chain is currently being handled.

    conditions: Map<string, boolean>

    Named conditions currently active.

    currentMode: string | null

    The active mode name, or null when no mode is set.

    eventNames: string[]

    Normalized key names to match (e.g. "s", "ctrl+q").

    Resolved global single-key entries.

    globalSequences: ResolvedGlobalSequenceEntry[]

    Resolved global sequence entries.

    input: string

    Raw input string from the terminal (empty for special keys).

    isNormalChar: (key: unknown) => boolean

    Predicate deciding whether a key is a normal printable character.

    key: unknown

    Raw key descriptor object (Ink's useInput second argument).

    layerKeyboardRefs: Map<string, LayerKeyboardLayer>

    Layer-id → keyboard data for all elements registered on that layer.

    layersRef: Map<unknown, PageKeyboardLayer>

    Component or page-id → page keyboard data.

    noActiveProcessor: string[]

    Processor ids deactivated for this event.

    notifyFocusChange: () => void

    Notifies the engine that focus changed.

    notifyPendingSyncs: () => void

    Notifies the engine that pending-sequence state changed.

    pagePath: TComponent[]

    The current page stack, bottom to top.

    pendingSeqRef: MutableRef<GlobalPendingSequence | null>

    The active global pending sequence, if any.

    topComponent: TComponent | null

    The topmost component in the page stack, or null when no page is registered.

    wildcardFirst: boolean

    Whether wildcard * bindings take priority over other bindings.