SharpDX.XInput The assembly provides managed XInput API. hh405053 XInput XInput A XInput controller. Initializes a new instance of the class. Index of the user. Gets the associated with this controller. The index of the user. Gets the battery information. Type of the battery device. unsigned int XInputGetBatteryInformation([In] XUSER_INDEX dwUserIndex,[In] BATTERY_DEVTYPE devType,[Out] XINPUT_BATTERY_INFORMATION* pBatteryInformation) Gets the capabilities. Type of the device query. unsigned int XInputGetCapabilities([In] XUSER_INDEX dwUserIndex,[In] XINPUT_DEVQUERYTYPE dwFlags,[Out] XINPUT_CAPABILITIES* pCapabilities) Gets the capabilities. Type of the device query. The capabilities of this controller. true if the controller is connected, false otherwise. Gets the keystroke. The flag. The keystroke. unsigned int XInputGetKeystroke([In] XUSER_INDEX dwUserIndex,[In] unsigned int dwReserved,[Out] XINPUT_KEYSTROKE* pKeystroke) Gets the state. The state of this controller. Gets the state. The state of this controller. true if the controller is connected, false otherwise. Sets the reporting. if set to true [enable reporting]. Sets the vibration. The vibration. Gets a value indicating whether this instance is connected. true if this instance is connected; otherwise, false.

Describes the current state of the Xbox 360 Controller.

This structure is used by the structure when polling for changes in the state of the controller.

The specific mapping of button to game function varies depending on the game type.

The constant XINPUT_GAMEPAD_TRIGGER_THRESHOLD may be used as the value which bLeftTrigger and bRightTrigger must be greater than to register as pressed. This is optional, but often desirable. Xbox 360 Controller buttons do not manifest crosstalk.

microsoft.directx_sdk.reference.xinput_gamepad XINPUT_GAMEPAD XINPUT_GAMEPAD
Constant TriggerThreshold. XINPUT_GAMEPAD_TRIGGER_THRESHOLD Constant LeftThumbDeadZone. XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE Constant RightThumbDeadZone. XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE

Bitmask of the device digital buttons, as follows. A set bit indicates that the corresponding button is pressed.

Device buttonBitmask
0x0001
0x0002
0x0004
0x0008
0x0010
0x0020
0x0040
0x0080
0x0100
0x0200
0x1000
0x2000
0x4000
0x8000

?

Bits that are set but not defined above are reserved, and their state is undefined.

microsoft.directx_sdk.reference.xinput_gamepad XINPUT_GAMEPAD_BUTTON_FLAGS wButtons XINPUT_GAMEPAD_BUTTON_FLAGS wButtons

The current value of the left trigger analog control. The value is between 0 and 255.

microsoft.directx_sdk.reference.xinput_gamepad unsigned char bLeftTrigger unsigned char bLeftTrigger

The current value of the right trigger analog control. The value is between 0 and 255.

microsoft.directx_sdk.reference.xinput_gamepad unsigned char bRightTrigger unsigned char bRightTrigger

Left thumbstick x-axis value. Each of the thumbstick axis members is a signed value between -32768 and 32767 describing the position of the thumbstick. A value of 0 is centered. Negative values signify down or to the left. Positive values signify up or to the right. The constants or can be used as a positive and negative value to filter a thumbstick input.

microsoft.directx_sdk.reference.xinput_gamepad short sThumbLX short sThumbLX

Left thumbstick y-axis value. The value is between -32768 and 32767.

microsoft.directx_sdk.reference.xinput_gamepad short sThumbLY short sThumbLY

Right thumbstick x-axis value. The value is between -32768 and 32767.

microsoft.directx_sdk.reference.xinput_gamepad short sThumbRX short sThumbRX

Right thumbstick y-axis value. The value is between -32768 and 32767.

microsoft.directx_sdk.reference.xinput_gamepad short sThumbRY short sThumbRY

Retrieves the battery type and charge status of a wireless controller.

microsoft.directx_sdk.reference.xinputgetbatteryinformation BATTERY_DEVTYPE BATTERY_DEVTYPE

Index of the signed-in gamer associated with the device. Can be a value in the range 0?XUSER_MAX_COUNT ? 1.

microsoft.directx_sdk.reference.xinputgetbatteryinformation BATTERY_DEVTYPE_GAMEPAD BATTERY_DEVTYPE_GAMEPAD

Specifies which device associated with this user index should be queried. Must be or .

microsoft.directx_sdk.reference.xinputgetbatteryinformation BATTERY_DEVTYPE_HEADSET BATTERY_DEVTYPE_HEADSET
No documentation. BATTERY_LEVEL BATTERY_LEVEL No documentation. BATTERY_LEVEL_EMPTY BATTERY_LEVEL_EMPTY No documentation. BATTERY_LEVEL_LOW BATTERY_LEVEL_LOW No documentation. BATTERY_LEVEL_MEDIUM BATTERY_LEVEL_MEDIUM No documentation. BATTERY_LEVEL_FULL BATTERY_LEVEL_FULL

Contains information on battery type and charge state.

microsoft.directx_sdk.reference.xinput_battery_information BATTERY_TYPE BATTERY_TYPE

The type of battery. BatteryType will be one of the following values.

ValueDescription
The device is not connected.?
The device is a wired device and does not have a battery.?
The device has an alkaline battery.?
The device has a nickel metal hydride battery.?
The device has an unknown battery type.?

?

microsoft.directx_sdk.reference.xinput_battery_information BATTERY_TYPE_DISCONNECTED BATTERY_TYPE_DISCONNECTED

The charge state of the battery. This value is only valid for wireless devices with a known battery type. BatteryLevel will be one of the following values.

Value

?

microsoft.directx_sdk.reference.xinput_battery_information BATTERY_TYPE_WIRED BATTERY_TYPE_WIRED
No documentation. microsoft.directx_sdk.reference.xinput_battery_information BATTERY_TYPE_ALKALINE BATTERY_TYPE_ALKALINE No documentation. microsoft.directx_sdk.reference.xinput_battery_information BATTERY_TYPE_NIMH BATTERY_TYPE_NIMH No documentation. microsoft.directx_sdk.reference.xinput_battery_information BATTERY_TYPE_UNKNOWN BATTERY_TYPE_UNKNOWN No documentation. XINPUT_CAPS_FLAGS XINPUT_CAPS_FLAGS No documentation. XINPUT_CAPS_VOICE_SUPPORTED XINPUT_CAPS_VOICE_SUPPORTED No documentation. XINPUT_CAPS_FFB_SUPPORTED XINPUT_CAPS_FFB_SUPPORTED No documentation. XINPUT_CAPS_WIRELESS XINPUT_CAPS_WIRELESS No documentation. XINPUT_CAPS_PMD_SUPPORTED XINPUT_CAPS_PMD_SUPPORTED No documentation. XINPUT_CAPS_NO_NAVIGATION XINPUT_CAPS_NO_NAVIGATION None. None None No documentation. XINPUT_DEVQUERYTYPE XINPUT_DEVQUERYTYPE No documentation. XINPUT_FLAG_GAMEPAD XINPUT_FLAG_GAMEPAD No documentation. XINPUT_FLAG_ANY XINPUT_FLAG_ANY

A table of controller subtypes available in XInput.

hh405050 XINPUT_DEVSUBTYPE XINPUT_DEVSUBTYPE
No documentation. hh405050 XINPUT_DEVSUBTYPE_GAMEPAD XINPUT_DEVSUBTYPE_GAMEPAD No documentation. hh405050 XINPUT_DEVSUBTYPE_UNKNOWN XINPUT_DEVSUBTYPE_UNKNOWN No documentation. hh405050 XINPUT_DEVSUBTYPE_WHEEL XINPUT_DEVSUBTYPE_WHEEL No documentation. hh405050 XINPUT_DEVSUBTYPE_ARCADE_STICK XINPUT_DEVSUBTYPE_ARCADE_STICK No documentation. hh405050 XINPUT_DEVSUBTYPE_FLIGHT_STICK XINPUT_DEVSUBTYPE_FLIGHT_STICK No documentation. hh405050 XINPUT_DEVSUBTYPE_DANCE_PAD XINPUT_DEVSUBTYPE_DANCE_PAD No documentation. hh405050 XINPUT_DEVSUBTYPE_GUITAR XINPUT_DEVSUBTYPE_GUITAR No documentation. hh405050 XINPUT_DEVSUBTYPE_GUITAR_ALTERNATE XINPUT_DEVSUBTYPE_GUITAR_ALTERNATE No documentation. hh405050 XINPUT_DEVSUBTYPE_DRUM_KIT XINPUT_DEVSUBTYPE_DRUM_KIT No documentation. hh405050 XINPUT_DEVSUBTYPE_GUITAR_BASS XINPUT_DEVSUBTYPE_GUITAR_BASS No documentation. hh405050 XINPUT_DEVSUBTYPE_ARCADE_PAD XINPUT_DEVSUBTYPE_ARCADE_PAD

Describes the capabilities of a connected controller. The function returns .

returns to indicate the characteristics and available functionality of a specified controller.

sets the structure members to indicate which inputs the device supports. For binary state controls, such as digital buttons, the corresponding bit reflects whether or not the control is supported by the device. For proportional controls, such as thumbsticks, the value indicates the resolution for that control. Some number of the least significant bits may not be set, indicating that the control does not provide resolution to that level.

The SubType member indicates the specific subtype of controller present. Games may detect the controller subtype and tune their handling of controller input or output based on subtypes that are well suited to their game genre. For example, a car racing game might check for the presence of a wheel controller to provide finer control of the car being driven. However, titles must not disable or ignore a device based on its subtype. Subtypes not recognized by the game or for which the game is not specifically tuned should be treated as a standard Xbox 360 Controller ().

Older XUSB Windows drivers report incomplete capabilities information, particularly for wireless devices. The latest XUSB Windows driver provides full support for wired and wireless devices, and more complete and accurate capabilties flags.

microsoft.directx_sdk.reference.xinput_capabilities XINPUT_DEVTYPE XINPUT_DEVTYPE
No documentation. microsoft.directx_sdk.reference.xinput_capabilities XINPUT_DEVTYPE_GAMEPAD XINPUT_DEVTYPE_GAMEPAD No documentation. XINPUT_GAMEPAD_BUTTON_FLAGS XINPUT_GAMEPAD_BUTTON_FLAGS No documentation. XINPUT_GAMEPAD_DPAD_UP XINPUT_GAMEPAD_DPAD_UP No documentation. XINPUT_GAMEPAD_DPAD_DOWN XINPUT_GAMEPAD_DPAD_DOWN No documentation. XINPUT_GAMEPAD_DPAD_LEFT XINPUT_GAMEPAD_DPAD_LEFT No documentation. XINPUT_GAMEPAD_DPAD_RIGHT XINPUT_GAMEPAD_DPAD_RIGHT No documentation. XINPUT_GAMEPAD_START XINPUT_GAMEPAD_START No documentation. XINPUT_GAMEPAD_BACK XINPUT_GAMEPAD_BACK No documentation. XINPUT_GAMEPAD_LEFT_THUMB XINPUT_GAMEPAD_LEFT_THUMB No documentation. XINPUT_GAMEPAD_RIGHT_THUMB XINPUT_GAMEPAD_RIGHT_THUMB No documentation. XINPUT_GAMEPAD_LEFT_SHOULDER XINPUT_GAMEPAD_LEFT_SHOULDER No documentation. XINPUT_GAMEPAD_RIGHT_SHOULDER XINPUT_GAMEPAD_RIGHT_SHOULDER No documentation. XINPUT_GAMEPAD_A XINPUT_GAMEPAD_A No documentation. XINPUT_GAMEPAD_B XINPUT_GAMEPAD_B No documentation. XINPUT_GAMEPAD_X XINPUT_GAMEPAD_X No documentation. XINPUT_GAMEPAD_Y XINPUT_GAMEPAD_Y None. None None No documentation. XINPUT_GAMEPAD_KEY_CODE XINPUT_GAMEPAD_KEY_CODE No documentation. VK_PAD_A VK_PAD_A No documentation. VK_PAD_B VK_PAD_B No documentation. VK_PAD_X VK_PAD_X No documentation. VK_PAD_Y VK_PAD_Y No documentation. VK_PAD_RSHOULDER VK_PAD_RSHOULDER No documentation. VK_PAD_LSHOULDER VK_PAD_LSHOULDER No documentation. VK_PAD_LTRIGGER VK_PAD_LTRIGGER No documentation. VK_PAD_RTRIGGER VK_PAD_RTRIGGER No documentation. VK_PAD_DPAD_UP VK_PAD_DPAD_UP No documentation. VK_PAD_DPAD_DOWN VK_PAD_DPAD_DOWN No documentation. VK_PAD_DPAD_LEFT VK_PAD_DPAD_LEFT No documentation. VK_PAD_DPAD_RIGHT VK_PAD_DPAD_RIGHT No documentation. VK_PAD_START VK_PAD_START No documentation. VK_PAD_BACK VK_PAD_BACK No documentation. VK_PAD_LTHUMB_PRESS VK_PAD_LTHUMB_PRESS No documentation. VK_PAD_RTHUMB_PRESS VK_PAD_RTHUMB_PRESS No documentation. VK_PAD_LTHUMB_UP VK_PAD_LTHUMB_UP No documentation. VK_PAD_LTHUMB_DOWN VK_PAD_LTHUMB_DOWN No documentation. VK_PAD_LTHUMB_RIGHT VK_PAD_LTHUMB_RIGHT No documentation. VK_PAD_LTHUMB_LEFT VK_PAD_LTHUMB_LEFT No documentation. VK_PAD_LTHUMB_UPLEFT VK_PAD_LTHUMB_UPLEFT No documentation. VK_PAD_LTHUMB_UPRIGHT VK_PAD_LTHUMB_UPRIGHT No documentation. VK_PAD_LTHUMB_DOWNRIGHT VK_PAD_LTHUMB_DOWNRIGHT No documentation. VK_PAD_LTHUMB_DOWNLEFT VK_PAD_LTHUMB_DOWNLEFT No documentation. VK_PAD_RTHUMB_UP VK_PAD_RTHUMB_UP No documentation. VK_PAD_RTHUMB_DOWN VK_PAD_RTHUMB_DOWN No documentation. VK_PAD_RTHUMB_RIGHT VK_PAD_RTHUMB_RIGHT No documentation. VK_PAD_RTHUMB_LEFT VK_PAD_RTHUMB_LEFT No documentation. VK_PAD_RTHUMB_UPLEFT VK_PAD_RTHUMB_UPLEFT No documentation. VK_PAD_RTHUMB_UPRIGHT VK_PAD_RTHUMB_UPRIGHT No documentation. VK_PAD_RTHUMB_DOWNRIGHT VK_PAD_RTHUMB_DOWNRIGHT No documentation. VK_PAD_RTHUMB_DOWNLEFT VK_PAD_RTHUMB_DOWNLEFT None. None None No documentation. XINPUT_KEYSTROKE_FLAGS XINPUT_KEYSTROKE_FLAGS No documentation. XINPUT_KEYSTROKE_KEYDOWN XINPUT_KEYSTROKE_KEYDOWN No documentation. XINPUT_KEYSTROKE_KEYUP XINPUT_KEYSTROKE_KEYUP No documentation. XINPUT_KEYSTROKE_REPEAT XINPUT_KEYSTROKE_REPEAT None. None None

Retrieves a gamepad input event.

Wireless controllers are not considered active upon system startup, and calls to any of the XInput functions before a wireless controller is made active return . Game titles must examine the return code and be prepared to handle this condition. Wired controllers are automatically activated when they are inserted. Wireless controllers are activated when the user presses the START or Xbox Guide button to power on the controller.

microsoft.directx_sdk.reference.xinputgetkeystroke XUSER_INDEX XUSER_INDEX

[in] Index of the signed-in gamer associated with the device. Can be a value in the range 0?XUSER_MAX_COUNT ? 1, or to fetch the next available input event from any user.

microsoft.directx_sdk.reference.xinputgetkeystroke XUSER_INDEX_ANY XUSER_INDEX_ANY

[in] Reserved

microsoft.directx_sdk.reference.xinputgetkeystroke XUSER_INDEX_ONE XUSER_INDEX_ONE

[out] Pointer to an structure that receives an input event.

microsoft.directx_sdk.reference.xinputgetkeystroke XUSER_INDEX_TWO XUSER_INDEX_TWO
No documentation. microsoft.directx_sdk.reference.xinputgetkeystroke XUSER_INDEX_THREE XUSER_INDEX_THREE No documentation. microsoft.directx_sdk.reference.xinputgetkeystroke XUSER_INDEX_FOUR XUSER_INDEX_FOUR Functions

Retrieves the current state of the specified controller.

Index of the user's controller. Can be a value from 0 to 3. For information about how this value is determined and how the value maps to indicators on the controller, see Multiple Controllers.

Pointer to an structure that receives the current state of the controller.

If the function succeeds, the return value is .

If the controller is not connected, the return value is .

If the function fails, the return value is an error code defined in Winerror.h. The function does not use SetLastError to set the calling thread's last-error code.

When is used to retrieve controller data, the left and right triggers are each reported separately. For legacy reasons, when DirectInput retrieves controller data, the two triggers share the same axis. The legacy behavior is noticeable in the current Game Device Control Panel, which uses DirectInput for controller state.

microsoft.directx_sdk.reference.xinputgetstate unsigned int XInputGetState([In] unsigned int dwUserIndex,[Out] XINPUT_STATE* pState) XInputGetState

Sends data to a connected controller. This function is used to activate the vibration function of a controller.

Index of the user's controller. Can be a value from 0 to 3. For information about how this value is determined and how the value maps to indicators on the controller, see Multiple Controllers.

Pointer to an structure containing the vibration information to send to the controller.

If the function succeeds, the return value is .

If the controller is not connected, the return value is .

If the function fails, the return value is an error code defined in WinError.h. The function does not use SetLastError to set the calling thread's last-error code.

microsoft.directx_sdk.reference.xinputsetstate unsigned int XInputSetState([In] unsigned int dwUserIndex,[In] XINPUT_VIBRATION* pVibration) XInputSetState

Retrieves the capabilities and features of a connected controller.

Index of the user's controller. Can be a value in the range 0?3. For information about how this value is determined and how the value maps to indicators on the controller, see Multiple Controllers.

Input flags that identify the controller type. If this value is 0, then the capabilities of all controllers connected to the system are returned. Currently, only one value is supported:

ValueDescription
Limit query to devices of Xbox 360 Controller type.

?

Any value of dwflags other than the above or 0 is illegal and will result in an error break when debugging.

Pointer to an structure that receives the controller capabilities.

If the function succeeds, the return value is .

If the controller is not connected, the return value is .

If the function fails, the return value is an error code defined in WinError.h. The function does not use SetLastError to set the calling thread's last-error code.

Note??The legacy XINPUT 9.1.0 version (included in Windows?Vista and later) always returned a fixed set of capabilities regardless of attached device.? microsoft.directx_sdk.reference.xinputgetcapabilities unsigned int XInputGetCapabilities([In] unsigned int dwUserIndex,[In] XINPUT_DEVQUERYTYPE dwFlags,[Out] XINPUT_CAPABILITIES* pCapabilities) XInputGetCapabilities

Sets the reporting state of XInput.

If enable is , XInput will only send neutral data in response to (all buttons up, axes centered, and triggers at 0). calls will be registered but not sent to the device. Sending any value other than will restore reading and writing functionality to normal.

This function is meant to be called when an application gains or loses focus (such as via WM_ACTIVATEAPP). Using this function, you will not have to change the XInput query loop in your application as neutral data will always be reported if XInput is disabled.

In a controller that supports vibration effects:

  • Passing will stop any vibration effects currently playing. In this state, calls to will be registered, but not passed to the device.
  • Passing TRUE will pass the last vibration request (even if it is 0) sent to to the device.
microsoft.directx_sdk.reference.xinputenable void XInputEnable([In] BOOL enable) XInputEnable

Retrieves the sound rendering and sound capture audio device IDs that are associated with the headset connected to the specified controller.

Index of the gamer associated with the device.

Windows Core Audio device ID string for render (speakers).

Size, in wide-chars, of the render device ID string buffer.

Windows Core Audio device ID string for capture (microphone).

Size, in wide-chars, of capture device ID string buffer.

If the function successfully retrieves the device IDs for render and capture, the return code is .

If there is no headset connected to the controller, the function will also retrieve with null as the values for pRenderDeviceId and pCaptureDeviceId.

If the controller port device is not physically connected, the function will return .

If the function fails, it will return a valid Win32 error code.

Callers must allocate the memory for the buffers passed to . The resulting strings can be of arbitrary length.

microsoft.directx_sdk.reference.xinputgetaudiodeviceids unsigned int XInputGetAudioDeviceIds([In] unsigned int dwUserIndex,[Out, Buffer, Optional] wchar_t* pRenderDeviceId,[InOut, Optional] unsigned int* pRenderCount,[Out, Buffer, Optional] wchar_t* pCaptureDeviceId,[InOut, Optional] unsigned int* pCaptureCount) XInputGetAudioDeviceIds

Retrieves the battery type and charge status of a wireless controller.

Index of the signed-in gamer associated with the device. Can be a value in the range 0?XUSER_MAX_COUNT ? 1.

Specifies which device associated with this user index should be queried. Must be or .

Pointer to an structure that receives the battery information.

If the function succeeds, the return value is .

microsoft.directx_sdk.reference.xinputgetbatteryinformation unsigned int XInputGetBatteryInformation([In] unsigned int dwUserIndex,[In] BATTERY_DEVTYPE devType,[Out] XINPUT_BATTERY_INFORMATION* pBatteryInformation) XInputGetBatteryInformation

Retrieves a gamepad input event.

[in] Index of the signed-in gamer associated with the device. Can be a value in the range 0?XUSER_MAX_COUNT ? 1, or to fetch the next available input event from any user.

[in] Reserved

[out] Pointer to an structure that receives an input event.

If the function succeeds, the return value is .

If no new keys have been pressed, the return value is .

If the controller is not connected or the user has not activated it, the return value is . See the Remarks section below.

If the function fails, the return value is an error code defined in Winerror.h. The function does not use SetLastError to set the calling thread's last-error code.

Wireless controllers are not considered active upon system startup, and calls to any of the XInput functions before a wireless controller is made active return . Game titles must examine the return code and be prepared to handle this condition. Wired controllers are automatically activated when they are inserted. Wireless controllers are activated when the user presses the START or Xbox Guide button to power on the controller.

microsoft.directx_sdk.reference.xinputgetkeystroke unsigned int XInputGetKeystroke([In] unsigned int dwUserIndex,[In] unsigned int dwReserved,[Out] XINPUT_KEYSTROKE* pKeystroke) XInputGetKeystroke

Contains information on battery type and charge state.

microsoft.directx_sdk.reference.xinput_battery_information XINPUT_BATTERY_INFORMATION XINPUT_BATTERY_INFORMATION

The type of battery. BatteryType will be one of the following values.

ValueDescription
The device is not connected.?
The device is a wired device and does not have a battery.?
The device has an alkaline battery.?
The device has a nickel metal hydride battery.?
The device has an unknown battery type.?

?

microsoft.directx_sdk.reference.xinput_battery_information BATTERY_TYPE BatteryType BATTERY_TYPE BatteryType

The charge state of the battery. This value is only valid for wireless devices with a known battery type. BatteryLevel will be one of the following values.

Value

?

microsoft.directx_sdk.reference.xinput_battery_information BATTERY_LEVEL BatteryLevel BATTERY_LEVEL BatteryLevel

Describes the capabilities of a connected controller. The function returns .

returns to indicate the characteristics and available functionality of a specified controller.

sets the structure members to indicate which inputs the device supports. For binary state controls, such as digital buttons, the corresponding bit reflects whether or not the control is supported by the device. For proportional controls, such as thumbsticks, the value indicates the resolution for that control. Some number of the least significant bits may not be set, indicating that the control does not provide resolution to that level.

The SubType member indicates the specific subtype of controller present. Games may detect the controller subtype and tune their handling of controller input or output based on subtypes that are well suited to their game genre. For example, a car racing game might check for the presence of a wheel controller to provide finer control of the car being driven. However, titles must not disable or ignore a device based on its subtype. Subtypes not recognized by the game or for which the game is not specifically tuned should be treated as a standard Xbox 360 Controller ().

Older XUSB Windows drivers report incomplete capabilities information, particularly for wireless devices. The latest XUSB Windows driver provides full support for wired and wireless devices, and more complete and accurate capabilties flags.

microsoft.directx_sdk.reference.xinput_capabilities XINPUT_CAPABILITIES XINPUT_CAPABILITIES
No documentation. microsoft.directx_sdk.reference.xinput_capabilities XINPUT_DEVTYPE Type XINPUT_DEVTYPE Type No documentation. microsoft.directx_sdk.reference.xinput_capabilities XINPUT_DEVSUBTYPE SubType XINPUT_DEVSUBTYPE SubType No documentation. microsoft.directx_sdk.reference.xinput_capabilities XINPUT_CAPS_FLAGS Flags XINPUT_CAPS_FLAGS Flags No documentation. microsoft.directx_sdk.reference.xinput_capabilities XINPUT_GAMEPAD Gamepad XINPUT_GAMEPAD Gamepad No documentation. microsoft.directx_sdk.reference.xinput_capabilities XINPUT_VIBRATION Vibration XINPUT_VIBRATION Vibration

Specifies keystroke data returned by .

Future devices may return HID codes and virtual key values that are not supported on current devices, and are currently undefined. Applications should ignore these unexpected values.

A virtual-key code is a byte value that represents a particular physical key on the keyboard, not the character or characters (possibly none) that the key can be mapped to based on keyboard state. The keyboard state at the time a virtual key is pressed modifies the character reported. For example, VK_4 might represent a "4" or a "$", depending on the state of the SHIFT key.

A reported keyboard event includes the virtual key that caused the event, whether the key was pressed or released (or is repeating), and the state of the keyboard at the time of the event. The keyboard state includes information about whether any CTRL, ALT, or SHIFT keys are down.

If the keyboard event represents an Unicode character (for example, pressing the "A" key), the Unicode member will contain that character. Otherwise, Unicode will contain the value zero.

The valid virtual-key (VK_xxx) codes are defined in XInput.h. In addition to codes that indicate key presses, the following codes indicate controller input.

ValueDescription
A button?
B button?
X button?
Y button?
Right shoulder button?
Left shoulder button?
Left trigger?
Right trigger?
Directional pad up?
Directional pad down?
Directional pad left?
Directional pad right?
START button?
BACK button?
Left thumbstick click?
Right thumbstick click?
Left thumbstick up?
Left thumbstick down?
Left thumbstick right?
Left thumbstick left?
Left thumbstick up and left?
Left thumbstick up and right?
Left thumbstick down and right?
Left thumbstick down and left?
Right thumbstick up?
Right thumbstick down?
Right thumbstick right?
Right thumbstick left?
Right thumbstick up and left?
Right thumbstick up and right?
Right thumbstick down and right?
Right thumbstick down and left?

?

microsoft.directx_sdk.reference.xinput_keystroke XINPUT_KEYSTROKE XINPUT_KEYSTROKE
No documentation. microsoft.directx_sdk.reference.xinput_keystroke XINPUT_GAMEPAD_KEY_CODE VirtualKey XINPUT_GAMEPAD_KEY_CODE VirtualKey No documentation. microsoft.directx_sdk.reference.xinput_keystroke wchar_t Unicode wchar_t Unicode No documentation. microsoft.directx_sdk.reference.xinput_keystroke XINPUT_KEYSTROKE_FLAGS Flags XINPUT_KEYSTROKE_FLAGS Flags No documentation. microsoft.directx_sdk.reference.xinput_keystroke XUSER_INDEX UserIndex XUSER_INDEX UserIndex No documentation. microsoft.directx_sdk.reference.xinput_keystroke unsigned char HidCode unsigned char HidCode

Represents the state of a controller.

The dwPacketNumber member is incremented only if the status of the controller has changed since the controller was last polled.

microsoft.directx_sdk.reference.xinput_state XINPUT_STATE XINPUT_STATE

State packet number. The packet number indicates whether there have been any changes in the state of the controller. If the dwPacketNumber member is the same in sequentially returned structures, the controller state has not changed.

microsoft.directx_sdk.reference.xinput_state unsigned int dwPacketNumber unsigned int dwPacketNumber

structure containing the current state of an Xbox 360 Controller.

microsoft.directx_sdk.reference.xinput_state XINPUT_GAMEPAD Gamepad XINPUT_GAMEPAD Gamepad

Specifies motor speed levels for the vibration function of a controller.

The left motor is the low-frequency rumble motor. The right motor is the high-frequency rumble motor. The two motors are not the same, and they create different vibration effects.

microsoft.directx_sdk.reference.xinput_vibration XINPUT_VIBRATION XINPUT_VIBRATION

Speed of the left motor. Valid values are in the range 0 to 65,535. Zero signifies no motor use; 65,535 signifies 100 percent motor use.

microsoft.directx_sdk.reference.xinput_vibration SHARPDX_USHORT wLeftMotorSpeed SHARPDX_USHORT wLeftMotorSpeed

Speed of the right motor. Valid values are in the range 0 to 65,535. Zero signifies no motor use; 65,535 signifies 100 percent motor use.

microsoft.directx_sdk.reference.xinput_vibration SHARPDX_USHORT wRightMotorSpeed SHARPDX_USHORT wRightMotorSpeed
Common interface for XInput to allow using XInput 1.4, 1.3 or 9.1.0. The namespace provides a managed XInput API. hh405053 XInput XInput Common error code from XInput Device is not connected Functions