Skip to content

Modifiers

Defined in: inputRouter.ts:29

inputRouter.ts

Chain-of-responsibility input routing (editor → UI → game)

The platform layer delivers raw events (key, pointer, wheel, touch) into the SDK. Before those events land in the InputState that gameplay code polls, they pass through the router’s tier-1 (editor) and tier-2 (UI) handlers. Either tier can return true from a callback to consume the event; consumed events do not update InputState and do not propagate to later tiers.

Tier-3 (game) is implicit — it is the InputState resource itself. Code that calls state.isKeyDown(...) / state.isMouseButtonDown(...) sees only events that no upstream handler claimed.

Chain-of-responsibility (rather than a boolean editor-is-active flag) lets a tool consume only the events it actually cares about: a marquee drag claims mouse-move while pressed but lets wheel scroll through to the viewport camera; a modal dialog consumes Escape but ignores the arrow keys.

readonly alt: boolean

Defined in: inputRouter.ts:32


readonly ctrl: boolean

Defined in: inputRouter.ts:31


readonly meta: boolean

Defined in: inputRouter.ts:33


readonly shift: boolean

Defined in: inputRouter.ts:30