-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
Allow passing bare modifier keys (control, alt, shift) when triggered alone #507
Conversation
I can see that it appears something is disliked by the |
Is it possible for you to log in to CircleCI? You should be able to log in with your Github account for free. |
2f009ec
to
43e43f9
Compare
One more account ... 😒 Looks like a formatting complaint? Addressed. |
I need to update the description / commit comment. The "math" is not based on left/right ctrl directly, but on the offset. I'm remember this now as the original change was made a month ago and I forgot 😅 |
43e43f9
to
8246453
Compare
Just as an FYI, you can run the build scripts locally. See CONTRIBUTING.md for details. |
4cbbeb8
to
16f34af
Compare
You're right. I've been running around overly busy, my apologies for the noise. |
Thinking about this a bit more, I think the better place to apply this logic would be in The keyboard HID module is pretty low-level, so we want to keep it as simple as possible.
|
I am not as familiar with the code as you are (obviously), but we'd want to keep concern for more than just I'm looking at the simplicity of We need to specifically pass |
Yep, that should be fine. |
@mtlynch If you want this logic moved into I believe we'll need to update Please bear in mind, my Python is quite rusty, as it is not something I have use extensively for several years. |
Allow the Keyboard hit to pass the bare modifier keys, such that hardware KVM key sequences can be used. In order for hardware KVM switches to recognize patterns such as `right-control, right-control, #, enter`, we must recognize and pass the correct sequence onward. In testing, this means passing only the `control_keys` and not the HID keycode itself. This adds `js_to_hid._map_keycode`, called from `js_to_hid.convert`. `hid.keycodes.KEYCODE_NONE` which is `0` for "no event indicated" per https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf (page 53) Updated `js_to_hid_test` to account for the expected changes within asserts for `ctrl` only tests.
16f34af
to
6e715fb
Compare
LGTM, thanks! |
Allow the Keyboard hit to pass the bare modifier keys, such that hardware KVM key sequences can be used.
In order for hardware KVM switches to recognize patterns such as
right-control, right-control, #, enter
, we must recognize and pass the correct sequence onward. In testing, this means passing only thecontrol_keys
and not the HID keycode itself.This adds
js_to_hid._map_keycode
, called fromjs_to_hid.convert
.hid.keycodes.KEYCODE_NONE
which is0
for "no event indicated" per https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf (page 53)Updated
js_to_hid_test
to account for the expected changes within asserts forctrl
only testsRelates to #78
Reported types from #78, and other personal experiences:
Willing to adjust/update for others, but built on in-place installation in rack.