Support for XInputGetKeyStroke
was added for XInput 1.3 (April 2007), but no Windows driver supports the 'Chatpad' device so it's limited to the controller "button keys".
The source for this function did not change between XInput 1.3 (the last version available down-level on Windows 7 via the legacy DirectX SDK / DirectSetup) and XInput 1.4 (the current version on Windows 8.x), so if there is a bug here it likely repros on XInput 1.4 as well.
This particular API is really only useful on Xbox 360 where the 'Chatpad' might be supported, and due to the down-level story for XInput, you are usually better served using XInput 9.1.0 rather than XInput 1.3 and sticking with the standard XInputGetState
methods anyhow. I don't use XInputGetKeyStroke
at all for the DirectX Tool Kit GamePad class which is probably a more useful abstraction.
See XINPUT and Windows 8 and DirectX Tool Kit: Now with GamePads
UPDATE: I found the code path that resulted in this condition, and will file a bug, but it's not likely to get fixed for XInput 1.3. One workaround would be to use another function (XInputGetState
or XInputGetCapabilities
) to check for connected state, and then call XInputGetKeyStroke
only if it is connected.