ink-cartridge
    Preparing search index...

    Interface KeyboardContextValue

    Value exposed by the keyboard system via React context.

    Exposes the KeyboardEngine API bound to the engine instance. Layer and element scoping of bindings is handled automatically by useKeyboard; consume the context directly only when necessary.

    interface KeyboardContextValue {
        _popOwner: (owner: unknown) => void;
        _pushOwner: (owner: unknown) => void;
        abortComposition: () => void;
        activateFocusGroup: (
            focusId: string,
            groupOrOptions?: string | FocusSetOptions,
        ) => boolean;
        activeProcessor: (id: BuiltinProcessorId) => boolean;
        addAction: (entry: ShortcutOperationEntry) => void;
        addCondition: (id: string, defaultVal: boolean) => boolean;
        addMapping: (
            base: string[],
            target: string[],
            options?: Omit<MappingKeyEntry<ComponentType<any>>, "keys" | "target">,
        ) => boolean;
        addMode: (mode: string) => boolean;
        addProcessor: (
            processor: PipelineProcessor<ComponentType<any>>,
            options?:
                | { before?: string & {}
                | BuiltinProcessorId }
                | { after?: string & {} | BuiltinProcessorId }
                | { index?: number },
        ) => void;
        addSequenceAction: (entry: SequenceOperationEntry) => void;
        allowModal: (keys: string[], options?: AllowModalOptions) => () => void;
        boundKeyboard: {
            (
                keys: string | string[],
                handler: KeyHandler,
                options?: BoundKeyboardReactOptions,
            ): () => void;
            (
                keys: string | string[],
                actionId: string,
                options?: BoundKeyboardReactOptions,
            ): () => void;
            (actionId: string, options?: BoundKeyboardReactOptions): () => void;
        };
        boundSequence: {
            (
                keys: string | string[],
                handler: KeyHandler,
                options?: SequenceReactOptions,
            ): () => void;
            (
                keys: string[],
                actionId: string,
                options?: SequenceReactOptions,
            ): () => void;
            (actionId: string, options?: SequenceReactOptions): () => void;
        };
        bufferedCompositionCount: () => number;
        clearAllCompositionKeys: () => void;
        clearCompositionBuffers: () => void;
        clearSequenceOperations: () => void;
        clearShortcutOperations: () => void;
        currentScreenHasSequenceWaiting: (sync?: () => void) => boolean;
        defineSequenceAction: (entries: SequenceOperationEntry[]) => void;
        defineShortcutAction: (entries: ShortcutOperationEntry[]) => void;
        enableWildcardPriority: () => () => void;
        focusCurrent: (
            groupOrOptions?: string | FocusSetOptions,
        ) => {
            noFound?: boolean;
            noLayer?: boolean;
            noOwner?: boolean;
            result?: { fromGroup: string | typeof defaultTargetsSymbol; id: string };
        };
        focusNext: (groupOrOptions?: string | FocusSetOptions) => void;
        focusPrev: (groupOrOptions?: string | FocusSetOptions) => void;
        focusSet: (
            focusId: string,
            groupOrOptions?: string | FocusSetOptions,
        ) => void;
        focusUnregister: (
            focusId: string,
            groupOrOptions?: string | FocusSetOptions,
        ) => void;
        getCompositionContext: () => CompositionContext;
        getCurrentMode: () => string | null;
        getGlobalKeys: () => ResolvedGlobalKeyEntry[];
        getGlobalPendingSequence: () => GlobalPendingSequence | null;
        getGlobalSequences: () => ResolvedGlobalSequenceEntry[];
        getHoveredMouseRegion: () => { layerId: string; regionId: string } | null;
        getLastCompositionEvent: () => CompositionEvent | null;
        getLastMappingEvent: () => MappingKeyEvent | null;
        getProcessors: () => readonly PipelineProcessor<ComponentType<any>>[];
        globalKeys: (
            entries: GlobalKeyEntry[],
            options?: { mode?: "replace" | "add" },
        ) => void;
        globalSequence: (
            entries: GlobalSequenceEntry[],
            options?: { mode?: "replace" | "add" },
        ) => void;
        hasAction: (actionId: string) => boolean;
        hasPendingComposition: () => boolean;
        hasSequenceAction: (sequenceActionId: string) => boolean;
        kickFocusGroup: (groupOrOptions?: string | FocusSetOptions) => boolean;
        kickProcessor: (id: BuiltinProcessorId) => boolean;
        modifyAction: (actionId: string, keys: string[]) => void;
        modifySequenceAction: (
            sequenceActionId: string,
            keys: string[],
            timeout?: number,
        ) => void;
        nextMode: () => void;
        penetration: (keys: string[], options?: PenetrationOptions) => () => void;
        prevMode: () => void;
        readLayer: (
            owner: unknown,
        ) => PageKeyboardLayer | ElementKeyboard | LayerKeyboardLayer | undefined;
        registerMouseRegion: (entry: MouseRegionEntry) => () => void;
        registryCompositionKey: (entry: CompositioKey<ComponentType<any>>) => void;
        removeAction: (actionId: string) => void;
        removeCompositionKey: (key: string) => boolean;
        removeCondition: (target: string) => boolean;
        removeMapping: (firstKey: string) => boolean;
        removeMappingKey: (keys: string[]) => boolean;
        removeMode: (mode: string) => boolean;
        removeProcessor: (processorId: string) => boolean;
        removeSequenceAction: (sequenceActionId: string) => void;
        resetProcessors: () => void;
        setCondition: (target: string, value: boolean) => boolean;
        setMode: (mode: string | null) => boolean;
        setValueSchema: (schema: ValueSchema) => void;
        stop: (keys: string[], options?: StopOptions) => () => void;
        subscribeComposition: (fn: () => void) => () => void;
        subscribeFocus: (listener: () => void) => () => void;
        subscribeMapping: (fn: () => void) => () => void;
        thereGlobalQueueWaiting: (sync?: () => void) => boolean;
        undoComposition: (
            steps?: number,
            options?: { byKey?: boolean; isolated?: boolean },
        ) => CompositionContext<unknown> | null;
        unregisterMouseRegion: (layerId: string, regionId: string) => void;
        updateCompositionKey: (
            key: string,
            flags: Flags,
            updates: Partial<Omit<CompositioKey<ComponentType<any>>, "key" | "flags">>,
        ) => boolean;
        useModalMissListener: (
            cb: ModalMissCallback,
            options?: ModalMissOptions,
        ) => () => void;
    }
    Index
    _popOwner: (owner: unknown) => void
    _pushOwner: (owner: unknown) => void
    abortComposition: () => void
    activateFocusGroup: (
        focusId: string,
        groupOrOptions?: string | FocusSetOptions,
    ) => boolean
    activeProcessor: (id: BuiltinProcessorId) => boolean
    addAction: (entry: ShortcutOperationEntry) => void
    addCondition: (id: string, defaultVal: boolean) => boolean
    addMapping: (
        base: string[],
        target: string[],
        options?: Omit<MappingKeyEntry<ComponentType<any>>, "keys" | "target">,
    ) => boolean
    addMode: (mode: string) => boolean
    addProcessor: (
        processor: PipelineProcessor<ComponentType<any>>,
        options?:
            | { before?: string & {}
            | BuiltinProcessorId }
            | { after?: string & {} | BuiltinProcessorId }
            | { index?: number },
    ) => void
    addSequenceAction: (entry: SequenceOperationEntry) => void
    allowModal: (keys: string[], options?: AllowModalOptions) => () => void
    boundKeyboard: {
        (
            keys: string | string[],
            handler: KeyHandler,
            options?: BoundKeyboardReactOptions,
        ): () => void;
        (
            keys: string | string[],
            actionId: string,
            options?: BoundKeyboardReactOptions,
        ): () => void;
        (actionId: string, options?: BoundKeyboardReactOptions): () => void;
    }
    boundSequence: {
        (
            keys: string | string[],
            handler: KeyHandler,
            options?: SequenceReactOptions,
        ): () => void;
        (
            keys: string[],
            actionId: string,
            options?: SequenceReactOptions,
        ): () => void;
        (actionId: string, options?: SequenceReactOptions): () => void;
    }
    bufferedCompositionCount: () => number
    clearAllCompositionKeys: () => void
    clearCompositionBuffers: () => void
    clearSequenceOperations: () => void
    clearShortcutOperations: () => void
    currentScreenHasSequenceWaiting: (sync?: () => void) => boolean
    defineSequenceAction: (entries: SequenceOperationEntry[]) => void
    defineShortcutAction: (entries: ShortcutOperationEntry[]) => void
    enableWildcardPriority: () => () => void
    focusCurrent: (
        groupOrOptions?: string | FocusSetOptions,
    ) => {
        noFound?: boolean;
        noLayer?: boolean;
        noOwner?: boolean;
        result?: { fromGroup: string | typeof defaultTargetsSymbol; id: string };
    }
    focusNext: (groupOrOptions?: string | FocusSetOptions) => void
    focusPrev: (groupOrOptions?: string | FocusSetOptions) => void
    focusSet: (focusId: string, groupOrOptions?: string | FocusSetOptions) => void
    focusUnregister: (
        focusId: string,
        groupOrOptions?: string | FocusSetOptions,
    ) => void
    getCompositionContext: () => CompositionContext
    getCurrentMode: () => string | null
    getGlobalKeys: () => ResolvedGlobalKeyEntry[]
    getGlobalPendingSequence: () => GlobalPendingSequence | null
    getGlobalSequences: () => ResolvedGlobalSequenceEntry[]
    getHoveredMouseRegion: () => { layerId: string; regionId: string } | null
    getLastCompositionEvent: () => CompositionEvent | null
    getLastMappingEvent: () => MappingKeyEvent | null
    getProcessors: () => readonly PipelineProcessor<ComponentType<any>>[]
    globalKeys: (
        entries: GlobalKeyEntry[],
        options?: { mode?: "replace" | "add" },
    ) => void
    globalSequence: (
        entries: GlobalSequenceEntry[],
        options?: { mode?: "replace" | "add" },
    ) => void
    hasAction: (actionId: string) => boolean
    hasPendingComposition: () => boolean
    hasSequenceAction: (sequenceActionId: string) => boolean
    kickFocusGroup: (groupOrOptions?: string | FocusSetOptions) => boolean
    kickProcessor: (id: BuiltinProcessorId) => boolean
    modifyAction: (actionId: string, keys: string[]) => void
    modifySequenceAction: (
        sequenceActionId: string,
        keys: string[],
        timeout?: number,
    ) => void
    nextMode: () => void
    penetration: (keys: string[], options?: PenetrationOptions) => () => void
    prevMode: () => void
    readLayer: (
        owner: unknown,
    ) => PageKeyboardLayer | ElementKeyboard | LayerKeyboardLayer | undefined
    registerMouseRegion: (entry: MouseRegionEntry) => () => void
    registryCompositionKey: (entry: CompositioKey<ComponentType<any>>) => void
    removeAction: (actionId: string) => void
    removeCompositionKey: (key: string) => boolean
    removeCondition: (target: string) => boolean
    removeMapping: (firstKey: string) => boolean
    removeMappingKey: (keys: string[]) => boolean
    removeMode: (mode: string) => boolean
    removeProcessor: (processorId: string) => boolean
    removeSequenceAction: (sequenceActionId: string) => void
    resetProcessors: () => void
    setCondition: (target: string, value: boolean) => boolean
    setMode: (mode: string | null) => boolean
    setValueSchema: (schema: ValueSchema) => void
    stop: (keys: string[], options?: StopOptions) => () => void
    subscribeComposition: (fn: () => void) => () => void
    subscribeFocus: (listener: () => void) => () => void
    subscribeMapping: (fn: () => void) => () => void
    thereGlobalQueueWaiting: (sync?: () => void) => boolean
    undoComposition: (
        steps?: number,
        options?: { byKey?: boolean; isolated?: boolean },
    ) => CompositionContext<unknown> | null
    unregisterMouseRegion: (layerId: string, regionId: string) => void
    updateCompositionKey: (
        key: string,
        flags: Flags,
        updates: Partial<Omit<CompositioKey<ComponentType<any>>, "key" | "flags">>,
    ) => boolean
    useModalMissListener: (
        cb: ModalMissCallback,
        options?: ModalMissOptions,
    ) => () => void