Returns the state of a connected joystick.

app.GetJoystickState( id, key ) → Number

The key can have many values depending on the used controller. The axis-n keys are for different joystick x/y/z axes or the D-Pad - you will best try which key stands for which button with the attached example.

See Also: GetJoystickName

Example - Show States click to expand contents