Joystick Class (Microsoft.Xna.Framework.Input)

Allows interaction with joysticks. Unlike GamePad the number of Buttons/Axes/DPads is not limited.
System.Object
   Microsoft.Xna.Framework.Input.Joystick

Namespace: Microsoft.Xna.Framework.Input
Assembly: MonoGame.Framework (MonoGame.Framework.dll 3.8.0.1082)
  • C#
  • VB
  • F#
public static class Joystick

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.

The Joystick type exposes the following members.

  Platforms Name Description
IsSupported Gets a value indicating whether the current platform supports reading raw joystick data. 
LastConnectedIndex Gets a value indicating the last joystick index connected to the system. If this value is less than 0, no joysticks are connected. The order joysticks are connected and disconnected determines their index. As such, this value may be larger than 0 even if only one joystick is connected.  
Top
  Platforms Name Description
GetCapabilities Gets the capabilites of the joystick. 
GetState(int) Gets the current state of the joystick. 
GetState(JoystickState, int) Gets the current state of the joystick by updating an existing JoystickState
Top
Supported in:

    
 Windows DirectX Desktop
    
 Linux Desktop
    
 Windows OpenGL Desktop
    
 Web