onGamepadButtonPress(btn: KGamepadButton | KGamepadButton[], action: (btn: KGamepadButton, gamepad: KGamepad)=>void): KEventController

Register an event that runs when user presses certain gamepad button.

parambtn- The button(s) to listen for.

paramaction- The function to run when the event is triggered.

returnsThe event controller.

sincev3001.0

onGamepadButtonPress(action: (btn: KGamepadButton, gamepad: KGamepad)=>void): KEventController

Register an event that runs when user presses any gamepad button.

paramaction- The function to run when the event is triggered.

returnsThe event controller.

sincev3001.0

kaplay logo

Misc

Layer