API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classInputManager
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; constructed automatically — you do not instantiate this class yourself.
import { InputManager } 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; constructed automatically — you do not instantiate this class yourself.
new(app: Application): InputManager destroy(): void getGamepad(slot: 0 | 1 | 2 | 3): Gamepad getPrimaryPointerPosition(): object | null onActive(channel: InputChannel | readonly InputChannel[], callback: object, options?: InputBindingOptions): InputBinding onStart(channel: InputChannel | readonly InputChannel[], callback: object, options?: InputBindingOptions): InputBinding onStop(channel: InputChannel | readonly InputChannel[], callback: object, options?: InputBindingOptions): InputBinding onTrigger(channel: InputChannel | readonly InputChannel[], callback: object, options?: InputBindingOptions): InputBinding update(): this canvasFocused: boolean connectedGamepadCount: number connectedGamepads: readonly Gamepad[] firstConnectedGamepad: Gamepad | null gamepads: readonly [Gamepad, Gamepad, Gamepad, Gamepad] gamepadSlotStrategy: GamepadSlotStrategy hasGamepad: boolean pointersInCanvas: boolean onAnyGamepadAxisChange: Signal<[Gamepad, GamepadAxis, number]> onAnyGamepadButtonDown: Signal<[Gamepad, GamepadButton, number]> onAnyGamepadButtonUp: Signal<[Gamepad, GamepadButton, number]> onAnyGamepadReassigned: Signal<[Gamepad, fromSlot]> onCanvasFocusChange: Signal<[focused]> onGamepadConnected: Signal<[Gamepad]> onGamepadDisconnected: Signal<[Gamepad]> onKeyDown: Signal<[number]> onKeyUp: Signal<[number]> onLongPress: Signal<[pointer]> onMouseWheel: Signal<[Vector]> onPinch: Signal<[scale, center]> onPointerCancel: Signal<[Pointer]> onPointerDown: Signal<[Pointer]> onPointerEnter: Signal<[Pointer]> onPointerLeave: Signal<[Pointer]> onPointerMove: Signal<[Pointer]> onPointerSwipe: Signal<[Pointer]> onPointerTap: Signal<[Pointer]> onPointerUp: Signal<[Pointer]> onRotate: Signal<[angleDelta, center]>