-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
feat(core): Adding pre-release for keys that were already pressed. #1828
feat(core): Adding pre-release for keys that were already pressed. #1828
Conversation
I have been testing these changes this week and everything is working as expected. It seems to fix #1076 but I haven't tried #1207. It works well with remote desktop too (at least with clients that didn't have the issues in #759). @andrewjrae heads up that one test |
I just tested this and it works well for the case the key is a regular |
I opened #1899 as a separate issue for the combo problem |
@andrewjrae Did you see the comment from @caksoylar regarding the test failures? |
I did @petejohanson, I haven't dug into it though, Edit: I just realized this is a different PR than I initially thought lol, the dangers of answering on your phone I guess. Anyways, the point remains that I'll try and take a look later this week. |
@andrewjrae it looks like this pre-releases modifiers. Is this intended? |
This fixes zmkfirmware#1207 and zmkfirmware#1076 (and maybe more?).
Added cases for the two use cases I know of: 1. Rolling with key-repeat behavior 2. Rolling symbols that have the same base key, eg `+=`
e38ff44
to
d4933e3
Compare
Thanks for looking @vvv-ca. Likely mods should be excluded from the pre-release code. I added another commit to prevent this from happening, and that test is now passing. It would be prettied up by a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one comment on the code itself, thanks for the test on this!
d4933e3
to
0596b03
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Should be fixed in zmkfirmware/zmk#1076 and zmkfirmware/zmk#1828
There are a couple of cases where a user may end up rolling two physical keys that happen to map to the same keycode. When this happens, we register a second key press, but this does nothing at the OS level, meaning only one key press will be registered by the computer.
The two cases I'm aware of are:
This PR solves both of these issues by simply releasing the keycode before it is pressed again.
I've also added some test suites to cover this behavior, though they rely on the new print out when pre-releasing keys in order to be effective.
This requires further testing, currently I'm running this without issue, but more users testing on different setups is needed. I'm curious if we're going to need larger delay between the releases and presses for some setups (remote desktops typically are sensitive to this kind of thing).