ink-cartridge
    Preparing search index...

    Interface PipelineProcessor<TComponent>

    A single stage in the keyboard event pipeline.

    Each processor evaluates whether it should handle the current event. If it consumes the event it returns true and the chain stops; otherwise it returns false to pass the event to the next processor.

    // A minimal custom processor — return true to consume, false to pass through
    engine.addProcessor({
    id: 'keystroke-logger',
    process(ctx) {
    console.log(`[key] input=${ctx.input} names=${ctx.eventNames}`);
    return false; // don't consume — let the chain continue
    },
    }, { index: 0 });
    interface PipelineProcessor<TComponent> {
        id: string;
        process(ctx: PipelineContext<TComponent>): boolean;
    }

    Type Parameters

    • TComponent
    Index
    id: string

    Builtin processor id or custom name, used for positioning, deactivation, and as a target for insertions.

    • Process one key event.

      Parameters

      • ctx: PipelineContext<TComponent>

        Snapshot of the engine state for this event.

      Returns boolean

      true to consume the event and stop the pipeline, false to pass it to the next processor.