Skip to content

API Interface MappingSpec

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

Interface: MappingSpec

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

One mapping: controls to an action.

Properties

action

readonly action: string;

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

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:59


consume?

readonly consume?: boolean;

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

Override the action's consume setting for this mapping.


control?

readonly control?: string;

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

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


down?

readonly down?: string;

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


left?

readonly left?: string;

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


modifier?

readonly modifier?: string | readonly string[];

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

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:70


negative?

readonly negative?: string;

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

axis parts.


positive?

readonly positive?: string;

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


right?

readonly right?: string;

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


triggers?

readonly triggers?: readonly TriggerSpec[];

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


up?

readonly up?: string;

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

dpad parts.

Clone this wiki locally