Skip to content

API Interface MappingSpec

github-actions[bot] edited this page Nov 27, 2026 · 2 revisions

Interface: MappingSpec

Defined in: src/engine/input/contextTypes.ts:60

One mapping: controls to an action.

Properties

action

readonly action: string;

Defined in: src/engine/input/contextTypes.ts:62

The action's name; "set.Id:action" when two sets have an action of that name.


composite?

readonly composite?: "axis" | "modifier" | "dpad";

Defined in: src/engine/input/contextTypes.ts:65


consume?

readonly consume?: boolean;

Defined in: src/engine/input/contextTypes.ts:79

Override the action's consume setting for this mapping.


control?

readonly control?: string;

Defined in: src/engine/input/contextTypes.ts:64

A control path (<Gamepad>/leftStick). For composite: "modifier", the main control.


down?

readonly down?: string;

Defined in: src/engine/input/contextTypes.ts:68


left?

readonly left?: string;

Defined in: src/engine/input/contextTypes.ts:69


modifier?

readonly modifier?: string | readonly string[];

Defined in: src/engine/input/contextTypes.ts:75

modifier: the control(s) that must be held, as Shift in Shift+B.


modifiers?

readonly modifiers?: readonly ModifierSpec[];

Defined in: src/engine/input/contextTypes.ts:76


negative?

readonly negative?: string;

Defined in: src/engine/input/contextTypes.ts:72

axis parts.


note?

readonly note?: string;

Defined in: src/engine/input/contextTypes.ts:84

A note for whoever edits the context (ADR 0433): why the mapping is there. Editor-only: the Input dialog shows and writes it, and the evaluator ignores it.


positive?

readonly positive?: string;

Defined in: src/engine/input/contextTypes.ts:73


right?

readonly right?: string;

Defined in: src/engine/input/contextTypes.ts:70


triggers?

readonly triggers?: readonly TriggerSpec[];

Defined in: src/engine/input/contextTypes.ts:77


up?

readonly up?: string;

Defined in: src/engine/input/contextTypes.ts:67

dpad parts.

Clone this wiki locally