Skip to content

createInput

createInput<TAction>(map, providers): InputState<TAction>

Defined in: src/modules/input/input-state.ts:42

Wires one or more InputProviders to an action map and returns a tick-boundary edge-detected InputState.

Edge semantics are action-level (not code-level): justPressed fires when an action transitions from zero keys down to at least one, justReleased when the last down key for the action is released. Holding one alias and pressing another does NOT re-fire justPressed.

Providers are NOT started here — KeyboardProvider attaches its listeners on construction. The factory simply subscribes for the translation layer.

TAction extends string

InputMap<TAction>

readonly InputProvider[]

InputState<TAction>