Skip to content

1681-engine / index / CaptureOptions

Interface: CaptureOptions ​

Defined in: src/input/InputCapture.ts:50

Properties ​

axisThreshold? ​

ts
optional axisThreshold?: number;

Defined in: src/input/InputCapture.ts:58

A stick half counts once pushed past this (default 0.6), so a resting stick's drift never binds.


cancelKeys? ​

ts
optional cancelKeys?: readonly string[];

Defined in: src/input/InputCapture.ts:56

Key codes that cancel the capture (default Escape; the pad's Start and B are buttons like any other).


devices? ​

ts
optional devices?: readonly ("keys" | "pad")[];

Defined in: src/input/InputCapture.ts:52

Which devices may answer (default keys and pad).


gamepads? ​

ts
optional gamepads?: () => readonly (PadState | null)[];

Defined in: src/input/InputCapture.ts:62

Where gamepads come from (default navigator.getGamepads).

Returns ​

readonly (PadState | null)[]


ignoreKeys? ​

ts
optional ignoreKeys?: readonly string[];

Defined in: src/input/InputCapture.ts:54

Key codes that do not count (default Escape: it cancels instead).


target? ​

ts
optional target?: EventTarget;

Defined in: src/input/InputCapture.ts:60

Where key presses are heard (default window).

Released under the MIT License.