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

feat(combos): clear combo timer only when affected keys are released #2494

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ssbb
Copy link

@ssbb ssbb commented Sep 22, 2024

Now, the key release listener checks if the released key is part of any combo candidate or active combo, instead of stopping the combo timer on any key release.

I also had to modify the tap-dance/3b-tap-int-seq test because it relied on the old combo release behavior, but I would like to double-check if this is the behavior we want to maintain.

Fixes #2378

@ssbb ssbb requested a review from a team as a code owner September 22, 2024 19:05
@ssbb ssbb changed the title Clear combo timer only when affected keys are released feat(combos): clear combo timer only when affected keys are released Dec 20, 2024
@ssbb ssbb force-pushed the combos-other-key-release branch from 1fdd5d6 to 5a26255 Compare December 20, 2024 00:39
@ssbb
Copy link
Author

ssbb commented Dec 20, 2024

I added one more failing test and a fix for an annoying issue where, if a combo overlaps (so it can't be resolved immediately) and is followed by another combo, only the first one is resolved. I think thats what actually happens in #1899 (since taipo using 3-key overlapping combos of course).

For me it was impossible to actuate both parens in a row (on middle+index opening at left hand, closing at right hand) due to overlapping combo with higher term (on ring+middle+index) on both hands.

The fix is to not release last keypress but reraise it (if there is fully pressed combo) so it can be used by the second combo.

@ssbb ssbb marked this pull request as draft December 20, 2024 14:19
@ssbb ssbb force-pushed the combos-other-key-release branch 2 times, most recently from 48adb38 to 154b4ab Compare December 20, 2024 19:35
@ssbb ssbb force-pushed the combos-other-key-release branch from 2e65f37 to 11c58a8 Compare December 20, 2024 22:30
@ssbb
Copy link
Author

ssbb commented Dec 20, 2024

Added a third test and a fix for the same issue as the original one, but for active combo release.

This PR now addresses the following issues:

  1. Combo is interrupted if any other key (even without combos assigned to it) is released (tests/other-key-release).
  2. Combo is interrupted if any key from an active combo is released (tests/other-key-release-2).
  3. A combo with an overlapping combo on the same spot (making it unable to resolve immediately) is interrupted if another combo candidate is initialized, preventing quick combo rolls (tests/overlapping-combos-5).

@ssbb ssbb marked this pull request as ready for review December 20, 2024 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Releasing other key in middle of the combo breaks the combo trigger
2 participants