API

Type Alias KeyboardInputMapEntry<TInteraction>

Mapping rule for keyboard inputs. The key field on the entry supports a single key code or an array of key codes for matching. When resolving, the condition's key is checked against the entry's key value(s).

type KeyboardInputMapEntry<TInteraction extends string = string> = {
    interaction: TInteraction;
    key?: number | number[];
    modifiers?: InputModifiers;
    sensitivity?: number;
    source: "keyboard";
}

Type Parameters

  • TInteraction extends string = string
Index
interaction: TInteraction

Interaction type to dispatch when this entry matches

key?: number | number[]

Key code filter(s). Supports a single code or an array. Omit to match any key.

modifiers?: InputModifiers

Modifier keys that must be active for this entry to match. Omit to match regardless of modifiers.

sensitivity?: number

Multiplier applied to input deltas before passing to the handler. Default is 1.

source: "keyboard"

Discriminator: keyboard input source