InputConfig
Defined in: types.ts:20
Configuration for the InputPlugin.
Properties
Section titled “Properties”actions?
Section titled “actions?”
optionalactions?:ActionMapDefinition
Defined in: types.ts:24
Action map: action name -> array of physical key codes.
deadzones?
Section titled “deadzones?”
optionaldeadzones?:object
Defined in: types.ts:39
Deadzone thresholds for analog inputs.
stick?
Section titled “stick?”
optionalstick?:number
Radial deadzone applied to stick magnitude (default 0.15).
trigger?
Section titled “trigger?”
optionaltrigger?:number
Lower deadzone for trigger analog values (default 0.05).
groups?
Section titled “groups?”
optionalgroups?:Record<string,string[]>
Defined in: types.ts:26
Input groups: group name -> array of action names belonging to it.
pollGamepads?
Section titled “pollGamepads?”
optionalpollGamepads?:boolean
Defined in: types.ts:56
Whether to poll navigator.getGamepads() each frame (default true).
Disable to use only synthetic input via fireGamepadButton/fireGamepadAxis
— useful for inspector probes that want deterministic state.
preventDefaultKeys?
Section titled “preventDefaultKeys?”
optionalpreventDefaultKeys?:string[]
Defined in: types.ts:28
Key codes to call preventDefault() on (default: none).
preventDefaultWheel?
Section titled “preventDefaultWheel?”
optionalpreventDefaultWheel?:boolean
Defined in: types.ts:69
Call preventDefault() on incoming wheel events so the page does not
scroll. Default false — opt in only if your game canvas should swallow
scroll. The listener is attached as { passive: false } when this is
enabled so preventDefault() actually takes effect.
rendererKey?
Section titled “rendererKey?”
optionalrendererKey?:ServiceKey<RendererAdapter>
Defined in: types.ts:37
Optional override for the renderer service key. When omitted, InputPlugin
auto-resolves RendererAdapterKey — the canonical @yagejs/renderer
plugin registers itself under that key, so pointer events target its
canvas and coordinates route through canvasToVirtual out of the box.
Set this only if you ship a custom renderer registered under a different
key.
target?
Section titled “target?”
optionaltarget?:HTMLElement
Defined in: types.ts:22
Target element for pointer events (default: canvas from renderer, or document).
triggerThreshold?
Section titled “triggerThreshold?”
optionaltriggerThreshold?:number
Defined in: types.ts:50
Trigger value at which GamepadLT/GamepadRT fire as button edges in the
action map (default 0.5). Below this, the trigger remains “released” for
isPressed purposes; the analog getTrigger value is unaffected.
wheelInvertY?
Section titled “wheelInvertY?”
optionalwheelInvertY?:boolean
Defined in: types.ts:62
Invert vertical scroll so positive dy means up (default false,
matching the W3C convention where positive deltaY is “scroll content
down”). Affects both onWheel callbacks and WheelUp/Down action edges.