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

    Interface PipelineProcessor<TComponent>

    A single stage in the keyboard event pipeline.

    This is the runtime shape the engine stores: the fields beyond id and process are stamped by the engine when a processor is registered, so callers never construct one of these directly — use ProcessorInput with KeyboardEngine.addProcessor and let the engine fill the rest.

    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 stored processor after addProcessor has stamped the runtime fields
    const p: PipelineProcessor<Comp> = {
    id: 'keystroke-logger',
    process(ctx) { return false; },
    active: true,
    weight: 0,
    };
    interface PipelineProcessor<TComponent> {
        active: boolean;
        id: string;
        weight: number;
        process(ctx: PipelineContext<TComponent>): boolean;
    }

    Type Parameters

    • TComponent
    Index
    active: boolean

    Whether the processor runs. processKey skips processors with active: false.

    id: string

    Built-in processor id or custom name, unique in the pipeline and usable as an insertion target or for kick/activate toggles.

    weight: number

    Priority — higher runs first. Processors sharing a weight form one stage; the stage runs as one unit, its members in insertion order.