Controller Constants

Category: Constants

Back to System Functions


Controller constants are used with JoyButtonDown, JoyButtonHit, and JoyAxis#.

Button Constants

Constant Description
JOY_BUTTON_AThe primary face button.
JOY_BUTTON_BThe right face button.
JOY_BUTTON_XThe left face button.
JOY_BUTTON_YThe top face button.
JOY_BUTTON_BACKThe back or select button.
JOY_BUTTON_GUIDEThe guide or system button when supported.
JOY_BUTTON_STARTThe start or menu button.
JOY_BUTTON_LEFT_STICKThe left stick button.
JOY_BUTTON_RIGHT_STICKThe right stick button.
JOY_BUTTON_LEFT_SHOULDERThe left shoulder button.
JOY_BUTTON_RIGHT_SHOULDERThe right shoulder button.
JOY_BUTTON_DPAD_UPThe D-pad up button.
JOY_BUTTON_DPAD_DOWNThe D-pad down button.
JOY_BUTTON_DPAD_LEFTThe D-pad left button.
JOY_BUTTON_DPAD_RIGHTThe D-pad right button.

Axis Constants

Constant Description
JOY_AXIS_LEFT_XThe left stick horizontal axis.
JOY_AXIS_LEFT_YThe left stick vertical axis.
JOY_AXIS_RIGHT_XThe right stick horizontal axis.
JOY_AXIS_RIGHT_YThe right stick vertical axis.
JOY_AXIS_LEFT_TRIGGERThe left trigger axis.
JOY_AXIS_RIGHT_TRIGGERThe right trigger axis.

Example

If JoyButtonDown(0, JOY_BUTTON_A) Then
    End
End If

If JoyAxis#(0, JOY_AXIS_LEFT_TRIGGER) > 0.5 Then
    End
End If