-
Notifications
You must be signed in to change notification settings - Fork 433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report device id on Windows #21
Comments
Low Level Keyboard hooks don't include device information. Raw Input Device listeners do, but they don't allow for blocking events. To combine both, we run a listener of each. Low level hook events are processed first (unknown why), so we put those events into a "deviceless_events" queue. When the corresponding raw input device events comes (identified by order), we fill the missing device id and pass it along to the generic keyboard library. Raw input devices are sometimes buffered, but as long as events are served in order, this should be ok. Unforutnately the device id is fetched after the window of opportunity for blocking events, so we can never block events based on it. On the other hand, we don't need to wait for the device id before deciding to block or allow, so events are processed more quickly and with less key delay. Please enter the commit message for your changes. Lines starting with '#' will be ignored, and an empty message aborts the commit.
The new branch "windows-device-id" now contains a possible solution to this problem. Low Level Keyboard hooks don't include device information. Raw Input Device Unfortunately the device id is fetched after the window of opportunity Still needs more testing. |
Note to self: https://www.codeproject.com/articles/716591/combining-raw-input-and-keyboard-hook-to-selective (uses DLL, but has interesting ideas on how to pair events) |
any progress on this? |
|
Is this issue still relevant ? |
Yes, I still want the feature and it's still not implemented. It's not my highest priority right now, though. |
Couple things to consider for interception: I think there's something wrong with the way it handles device reconnect |
for whatever it's worth, I would also love this feature, but dont know enough about windows development to contribute. |
Linux already has this.
Device information is not included in the hook we are using, which complicates things. Raw Input seems to provide this, but it doesn't include the virtual key codes we use to map most of the key names and keypad status.
There should be some kind of device information on
event.device
.Note: https://github.com/me2d13/luamacros seems to do this.
The text was updated successfully, but these errors were encountered: