Class Joystick
Provides access to Joystick devices.
Joystick devices provide a varying number of axes and buttons.
Use GetCapabilities
to retrieve the number of supported
axes and buttons on a given device.
Use GetState
to retrieve the current state of a given device.
Inheritance
Inherited Members
Namespace: OpenTK.Input
Assembly: cs.temp.dll.dll
Syntax
public sealed class Joystick
Methods
GetCapabilities(Int32)
Retrieves the JoystickCapabilities of the device connected at the specified index.
Declaration
public static JoystickCapabilities GetCapabilities(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the device to poll. |
Returns
Type | Description |
---|---|
JoystickCapabilities | A JoystickCapabilities structure describing
the capabilities of the device at the specified index.
If no device is connected at the specified index, the |
GetGuid(Int32)
Retrieves the ID of the device connected at the specified index.
Declaration
public static Guid GetGuid(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the device to poll. |
Returns
Type | Description |
---|---|
System.Guid | A System.Guid representing the id of the connected device. |
GetState(Int32)
Retrieves the JoystickState of the device connected at the specified index.
Declaration
public static JoystickState GetState(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the device to poll. |
Returns
Type | Description |
---|---|
JoystickState | A JoystickState structure describing
the current state of the device at the specified index.
If no device is connected at this index, the |