Defines a single input binding that maps one or more input sources to a command.
At least one input type must be defined. You can specify multiple input types to allow different input devices to trigger the same command.
keyboardInput
Inputs.KEYBOARD_*
controllerInput
Inputs.CONTROLLER_*
systemInput
Inputs.SYSTEM_TICK
customInput
const jump: SingleInputEntry = { keyboardInput: Inputs.KEYBOARD_SPACE, controllerInput: Inputs.CONTROLLER_FACE_BOTTOM, command: new JumpCommand()}; Copy
const jump: SingleInputEntry = { keyboardInput: Inputs.KEYBOARD_SPACE, controllerInput: Inputs.CONTROLLER_FACE_BOTTOM, command: new JumpCommand()};
Defines a single input binding that maps one or more input sources to a command.
At least one input type must be defined. You can specify multiple input types to allow different input devices to trigger the same command.
Input Types
keyboardInput- Keyboard key (useInputs.KEYBOARD_*constants)controllerInput- Gamepad button (useInputs.CONTROLLER_*constants)systemInput- System events likeInputs.SYSTEM_TICKcustomInput- Custom input key for programmatic triggersExample