Simulate pressing or releasing (or both) gamepad buttons.
-
control (
GamePadControl
) Button to simulate -
pressState (
PressState
) Action to simulate -
gamepadIndex (
Int32
) Which of 4 possible gamepads to simulate: 0 (default), 1, 2 or 3
Shows how to press "A" on the gamepad for 500ms, then release it.
GamePad.Simulate(GamePadControl.A, PressState.Press); setTimeout(function () { GamePad.Simulate(GamePadControl.A, PressState.Release); }, 500);