ink-cartridge
    Preparing search index...

    Interface KeyboardProviderProps

    Props for the keyboard provider.

    interface KeyboardProviderProps {
        autoTab?: boolean;
        children: ReactNode;
        defaultMode?: string | null;
        modes?: string[];
        mouse?: boolean;
        mouseOptions?: MouseOptions;
        processors?: KeyboardProcessorProps<ComponentType<any>>[];
        valueSchema?: ValueSchema;
    }
    Index
    autoTab?: boolean

    Whether the engine automatically handles Tab / Shift+Tab for focus rotation. Defaults to false.

    When true, the engine intercepts Tab/Shift+Tab and cycles focus automatically. When false or omitted, developers must call focusNext / focusPrev manually.

    children: ReactNode

    The app tree rendered inside the provider.

    defaultMode?: string | null

    The default mode must be pre-registered in the modes list.

    modes?: string[]

    Please enter the mode flag you wish to register directly.

    <KeyboardProvider modes={["insert", "editor"]}>
    
    mouse?: boolean

    Enables terminal mouse tracking (wires xterm-mouse into the engine).

    Mouse escape sequences are filtered out of the keyboard stream automatically, so they never reach useInput handlers as garbage text. Mark any <Box> with useMouseRegion to receive click, wheel, hover, and drag callbacks.

    mouseOptions?: MouseOptions

    Options passed to the internal xterm-mouse Mouse instance when mouse is enabled. See MouseOptions (e.g. clickDistanceThreshold, pressStormThreshold, degradedDedupDistance).

    processors?: KeyboardProcessorProps<ComponentType<any>>[]

    Here you can pre-insert the custom processors you want, and they will be inserted into the pipeline based on their index and ID.

    <KeyboardProvider
    processors={[
    { id: "uppercase", index: 0, processor: MyUppercaseProcessor },
    { id: "logger", index: 1, processor: MyLoggerProcessor },
    ]}
    >
    valueSchema?: ValueSchema

    Optional runtime type schema for composition chain value validation.

    <KeyboardProvider valueSchema={{
    times: (v): v is number => typeof v === 'number',
    action: (v): v is number => typeof v === 'number',
    }}>