[HID] Enable Keyboard Passthru

Thanks Adrian for figuring out missing XINPUT_KEYSTROKE_VALIDUNICODE flag.
Thanks Clippy95 for figuring out shift and capslock
This commit is contained in:
Gliniak
2024-12-16 18:53:42 +01:00
committed by Radosław Gliński
parent 2596aef111
commit f6ae651cc2
7 changed files with 74 additions and 39 deletions

View File

@@ -200,6 +200,9 @@ X_RESULT XInputInputDriver::GetKeystroke(uint32_t user_index, uint32_t flags,
// flags is reserved on desktop.
DWORD result;
if ((flags & XINPUT_FLAG_KEYBOARD) != 0) {
return X_ERROR_INVALID_PARAMETER;
}
// XInputGetKeystroke on Windows has a bug where it will return
// ERROR_SUCCESS (0) even if the device is not connected:
// https://stackoverflow.com/questions/23669238/xinputgetkeystroke-returning-error-success-while-controller-is-unplugged