API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classInputSystem
Owns the unified input pipeline for an Application: keyboard events, pointer (mouse/touch/pen) events with multi-touch slot management, gamepad polling with mapping detection, mouse-wheel events, canvas-focus tracking, and high-level gesture recognition (pinch / rotate / long-press). All raw inputs are written into a shared `Float32Array` channel buffer. Bind input listeners via the onTrigger / onActive / onStart / onStop factory methods (or via Gamepad.onTrigger-style methods on individual pads), or subscribe to the signal-style notifications (`onKeyDown`, `onPointerDown`, `onGamepadConnected`, `onAnyGamepadButtonDown`, ...). Driven each frame by Application.update's internal prepare stage (first, ahead of interaction/audio/tweens/rendering); constructed automatically - you do not instantiate this class yourself.
import { InputSystem } from '@codexo/exojs'Owns the unified input pipeline for an Application: keyboard events, pointer (mouse/touch/pen) events with multi-touch slot management, gamepad polling with mapping detection, mouse-wheel events, canvas-focus tracking, and high-level gesture recognition (pinch / rotate / long-press).
All raw inputs are written into a shared `Float32Array` channel buffer. Bind input listeners via the onTrigger / onActive / onStart / onStop factory methods (or via Gamepad.onTrigger-style methods on individual pads), or subscribe to the signal-style notifications (`onKeyDown`, `onPointerDown`, `onGamepadConnected`, `onAnyGamepadButtonDown`, ...).
Driven each frame by Application.update's internal prepare stage (first, ahead of interaction/audio/tweens/rendering); constructed automatically - you do not instantiate this class yourself.
destroy(): voidgetPrimaryPointerPosition(): PointLikeStructural type for any object with a 2D `x`/`y` position. | nulllockPointer(): voidonActive(channel: InputChannelChannel a single InputBinding can subscribe to. | readonly InputChannelChannel a single InputBinding can subscribe to.[], callback?: (value: number) => void, options?: InputBindingOptionsConstruction options shared by every binding factory method.): InputBindingOne subscription to one or more input channels. Tracks active state, fires the onStart / onActive / onStop / onTrigger Signals each frame, and registers itself…onStart(channel: InputChannelChannel a single InputBinding can subscribe to. | readonly InputChannelChannel a single InputBinding can subscribe to.[], callback?: (value: number) => void, options?: InputBindingOptionsConstruction options shared by every binding factory method.): InputBindingOne subscription to one or more input channels. Tracks active state, fires the onStart / onActive / onStop / onTrigger Signals each frame, and registers itself…onStop(channel: InputChannelChannel a single InputBinding can subscribe to. | readonly InputChannelChannel a single InputBinding can subscribe to.[], callback?: (value: number) => void, options?: InputBindingOptionsConstruction options shared by every binding factory method.): InputBindingOne subscription to one or more input channels. Tracks active state, fires the onStart / onActive / onStop / onTrigger Signals each frame, and registers itself…onTrigger(channel: InputChannelChannel a single InputBinding can subscribe to. | readonly InputChannelChannel a single InputBinding can subscribe to.[], callback?: (value: number) => void, options?: InputBindingOptionsConstruction options shared by every binding factory method.): InputBindingOne subscription to one or more input channels. Tracks active state, fires the onStart / onActive / onStop / onTrigger Signals each frame, and registers itself…unlockPointer(): voidcanvasFocused: booleanconnectedGamepadCount: numbergamepads: readonly [GamepadOne of four stable gamepad slots. Lives for the entire `Application` lifetime even when no physical pad is attached - a "mailbox" that physical hardware moves…, GamepadOne of four stable gamepad slots. Lives for the entire `Application` lifetime even when no physical pad is attached - a "mailbox" that physical hardware moves…, GamepadOne of four stable gamepad slots. Lives for the entire `Application` lifetime even when no physical pad is attached - a "mailbox" that physical hardware moves…, GamepadOne of four stable gamepad slots. Lives for the entire `Application` lifetime even when no physical pad is attached - a "mailbox" that physical hardware moves…]hasGamepad: booleanpointerLocked: booleanpointersInCanvas: booleanonAnyGamepadAxisChange: SignalLightweight typed event emitter. Each `Signal` represents one named notification channel (e.g. `onResize`, `onFrame`). Listeners are added with Signal.add or S…<[GamepadOne of four stable gamepad slots. Lives for the entire `Application` lifetime even when no physical pad is attached - a "mailbox" that physical hardware moves…, GamepadAxisSingle mappable analog axis on a physical gamepad. Holds the raw browser `Gamepad.axes[]` index, the canonical channel the value is written to, and the transfo…, number]>onAnyGamepadButtonDown: SignalLightweight typed event emitter. Each `Signal` represents one named notification channel (e.g. `onResize`, `onFrame`). Listeners are added with Signal.add or S…<[GamepadOne of four stable gamepad slots. Lives for the entire `Application` lifetime even when no physical pad is attached - a "mailbox" that physical hardware moves…, GamepadButtonSingle mappable button on a physical gamepad. Holds the raw browser `Gamepad.buttons[]` index, the canonical channel the value is written to, and the deadzone/…, number]>onAnyGamepadButtonUp: SignalLightweight typed event emitter. Each `Signal` represents one named notification channel (e.g. `onResize`, `onFrame`). Listeners are added with Signal.add or S…<[GamepadOne of four stable gamepad slots. Lives for the entire `Application` lifetime even when no physical pad is attached - a "mailbox" that physical hardware moves…, GamepadButtonSingle mappable button on a physical gamepad. Holds the raw browser `Gamepad.buttons[]` index, the canonical channel the value is written to, and the deadzone/…, number]>onAnyGamepadReassigned: SignalLightweight typed event emitter. Each `Signal` represents one named notification channel (e.g. `onResize`, `onFrame`). Listeners are added with Signal.add or S…<[GamepadOne of four stable gamepad slots. Lives for the entire `Application` lifetime even when no physical pad is attached - a "mailbox" that physical hardware moves…, fromSlot]>onContextMenu: SignalLightweight typed event emitter. Each `Signal` represents one named notification channel (e.g. `onResize`, `onFrame`). Listeners are added with Signal.add or S…<[ContextMenuRequestA request to show a context menu, in design-space coordinates. Right-click, the keyboard context-menu key, and Shift+F10 all funnel into the same native `conte…]>onGamepadConnected: SignalLightweight typed event emitter. Each `Signal` represents one named notification channel (e.g. `onResize`, `onFrame`). Listeners are added with Signal.add or S…<[GamepadOne of four stable gamepad slots. Lives for the entire `Application` lifetime even when no physical pad is attached - a "mailbox" that physical hardware moves…]>onGamepadDisconnected: SignalLightweight typed event emitter. Each `Signal` represents one named notification channel (e.g. `onResize`, `onFrame`). Listeners are added with Signal.add or S…<[GamepadOne of four stable gamepad slots. Lives for the entire `Application` lifetime even when no physical pad is attached - a "mailbox" that physical hardware moves…]>onRotate: SignalLightweight typed event emitter. Each `Signal` represents one named notification channel (e.g. `onResize`, `onFrame`). Listeners are added with Signal.add or S…<[angleDelta, centerX, centerY]>