Skip to content
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

fix(windows): reduce blast radius of sft-arrow workaround #414

Merged
merged 1 commit into from
May 22, 2023

Conversation

jtroo
Copy link
Owner

@jtroo jtroo commented May 21, 2023

This commit makes changes to the blast radius of the workaround for issue #138:

Shift and arrows interact weirdly on a layer

Discovered in this issue was a problem where activating shift on keys other than the physical shift keys, and then also pressing arrow keys, caused stuck-shift behaviour. The fault is, as is typical, Windows' weird behaviour. The workaround added was to release all shift key states if a single shift key state was found to no longer exist, when comparing the previous keyberon state to the current one.

In some cases, this release of shift causes an earlier release of shift than is desired, because some other key activated shift. This commit reduces the blast radius of the shift state releases to only states with the physical lsft key. In hindsight, Windows' weird behaviour only would have affected the physical lsft key's coordinate anyway, so this is a good change to make. In addition, this issue only affects the LLHOOK mechanism and not Interception, so the code is conditionally compiled out for the Interception driver as well.

Fixes #346

This commit makes changes to the blast radius of the workaround for
issue #138:

> Shift and arrows interact weirdly on a layer

Discovered in this issue was a problem where activating shift on keys
other than the physical shift keys, and then also pressing arrow keys,
caused stuck-shift behaviour. The fault is, as is typical, Windows'
weird behaviour. The workaround added was to release all shift key
states if a single shift key state was found to no longer exist, when
comparing the previous keyberon state to the current one.

In some cases, this release of shift causes an earlier release of shift
than is desired, because some other key activated shift. This commit
reduces the blast radius of the shift state releases to only states with
the physical lsft key. In hindsight, Windows' weird behaviour only
would have affected the physical lsft key's coordinate anyway, so this
is a good change to make. In addition, this issue only affects the
LLHOOK mechanism and not Interception, so the code is conditionally
compiled out for the Interception driver as well.
@jtroo jtroo changed the title fix: reduce blast radius of windows sft-arrowkey workaround fix: reduce blast radius of windows sft-arrow workaround May 21, 2023
@jtroo jtroo changed the title fix: reduce blast radius of windows sft-arrow workaround fix(windows): reduce blast radius of sft-arrow workaround May 21, 2023
@jtroo jtroo force-pushed the reduce-lsft-workaround-blast-radius branch from dd17391 to 25593de Compare May 21, 2023 20:31
@jtroo jtroo merged commit 18358ce into main May 22, 2023
3 checks passed
@jtroo jtroo deleted the reduce-lsft-workaround-blast-radius branch May 22, 2023 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: make one-shot action more robust with parameters just like tap-hold
1 participant