Interface: InputState
Scene input state (docs/109 §5). Controllers read actions, never key codes.
Properties
| Property | Modifier | Type |
|---|---|---|
focused | readonly | boolean |
Methods
define()
ts
define(def): () => void;Parameters
| Parameter | Type |
|---|---|
def | InputActionDef |
Returns
() => void
bind()
ts
bind(binding): () => void;Parameters
| Parameter | Type |
|---|---|
binding | KeyBinding |
Returns
() => void
held()
ts
held(action): boolean;Parameters
| Parameter | Type |
|---|---|
action | string |
Returns
boolean
pressed()
ts
pressed(action): boolean;Parameters
| Parameter | Type |
|---|---|
action | string |
Returns
boolean
released()
ts
released(action): boolean;Parameters
| Parameter | Type |
|---|---|
action | string |
Returns
boolean
axis()
ts
axis(action): number;Parameters
| Parameter | Type |
|---|---|
action | string |
Returns
number
setAction()
ts
setAction(action, value): void;Programmatic device override; visible after the next beginFrame only.
Parameters
| Parameter | Type |
|---|---|
action | string |
value | number | boolean |
Returns
void
press()
ts
press(action): void;Forces a one-frame press edge at the next beginFrame.
Parameters
| Parameter | Type |
|---|---|
action | string |
Returns
void
release()
ts
release(action): void;Forces a one-frame release edge at the next beginFrame.
Parameters
| Parameter | Type |
|---|---|
action | string |
Returns
void
clear()
ts
clear(): void;Returns
void
focus()
ts
focus(): void;Returns
void
blur()
ts
blur(): void;Returns
void
setKey()
ts
setKey(code, down): void;Device layer: set a physical key state; bindings map it to actions.
Parameters
| Parameter | Type |
|---|---|
code | string |
down | boolean |
Returns
void
hasBinding()
ts
hasBinding(code): boolean;Whether any binding uses code (keyboard preventDefault gate).
Parameters
| Parameter | Type |
|---|---|
code | string |
Returns
boolean
pressKey()
ts
pressKey(code): void;Forces one press edge for every action bound to code at the next beginFrame.
Parameters
| Parameter | Type |
|---|---|
code | string |
Returns
void
beginFrame()
ts
beginFrame(): void;Refreshes pressed/released/held snapshots; called before update.
Returns
void
