ink-cartridge
    Preparing search index...

    Interface ResolvedGlobalKeyEntry

    Internal type: GlobalKeyEntry after string operate references have been resolved to callable functions and pressCount has been initialized for entries with a times option.

    Used by the keyboard provider's refs after globalKeys() resolves action IDs. Public API continues to accept GlobalKeyEntry with operate: string | (() => void).

    interface ResolvedGlobalKeyEntry {
        affectLayer?: boolean;
        category?: unknown[] | "*";
        cover?: boolean;
        executeWhenNoOverlay?: boolean;
        key: string | string[];
        mode?: string;
        observer?: (times: number) => void;
        operate: () => void;
        pressCount?: number;
        times?: number;
        when?: string | (() => boolean);
    }
    Index
    affectLayer?: boolean

    Whether this global key fires before the layer broadcast (true) or after it (false, the default).

    category?: unknown[] | "*"

    Whitelist of screen components that may use this global key. "*" or omitted matches all screens; [] disables the key.

    cover?: boolean

    Whether screen components are allowed to override this global key via boundKeyboard. Defaults to true.

    executeWhenNoOverlay?: boolean

    When true, an overlay-phase entry (affectLayer: true) fires even while no layer is open. Only relevant when affectLayer is true.

    key: string | string[]

    Key name(s) to match, in the same normalized format as boundKeyboard.

    mode?: string

    Restrict this global key to a specific mode; when omitted it fires in all modes (including no-mode).

    observer?: (times: number) => void

    Callback invoked on every key press while counting toward times, receiving the number of remaining presses before the handler fires.

    operate: () => void

    The callback to invoke when the key is pressed — string action references have already been resolved to their callbacks.

    pressCount?: number

    Current press count — initialized to 0 when times is set, incremented on each matching press, and reset to 0 once the counter reaches times and the handler fires.

    times?: number

    Number of presses required before the handler fires. Semantics are identical to GlobalKeyEntry.times.

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

    Optional condition — when it evaluates to false the entry is skipped entirely.