Skip to content

API Interface RebindOptions

github-actions[bot] edited this page Nov 29, 2026 · 4 revisions

Interface: RebindOptions

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

Properties

add?

readonly add?: boolean;

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

Add a mapping instead of replacing one: the next press becomes a new single-control mapping of the action for the device group (with chord, the controls pressed together become a chord).


cancel?

readonly cancel?: string;

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

A control that cancels instead of binding (default <Keyboard>/escape).


chord?

readonly chord?: boolean;

Defined in: src/engine/input/rebind.ts:89

Bind the controls pressed together: the main control and every control held with it become the mapping's control and modifier0…. Default: true for a modifier composite's main control (part unset or control), else false. Only for a single control or a modifier composite's control part. A chord of a different size from the mapping's replaces the mapping (a lone key for Shift+B, or Ctrl+Shift+B).


context?

readonly context?: string;

Defined in: src/engine/input/rebind.ts:74

Only this context's mapping (default: the first, by priority, that has the action for those devices). With add, the context the new mapping goes into (default: the first, by priority, that has a mapping of the action, else the default context).


device?

readonly device?: DeviceGroup;

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

Which devices' mapping to rebind: keyboard (with the pointer), gamepad, touch or pen. Default: the group of the family the player last used.


part?

readonly part?: string;

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

For a composite: the part to rebind (up, down, left, right, negative, positive, control, modifier0…).


timeout?

readonly timeout?: number;

Defined in: src/engine/input/rebind.ts:81

Give up after this many seconds (reported as canceled). Default: wait.

Clone this wiki locally