Skip to content

Preserve held button modifiers across triggers and fix mapping conflicts - #1390

Merged
lujjjh merged 1 commit into
mainfrom
fix/repeat-held-button-chords
Sep 12, 2026
Merged

lujjjh merged 1 commit into
mainfrom
fix/repeat-held-button-chords

Conversation

@lujjjh

@lujjjh lujjjh commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Keep whileHeld buttons usable across trigger presses. For example, hold A and B, then press and release C multiple times without releasing A or B. Previously, A and B had to be released and pressed again before C could trigger the mapping again.

Each trigger press starts fresh timing and movement tracking, with balanced press-action lifecycles. Preserve held modifiers through wheel actions, cancellation, and releasing and pressing prefix buttons again.

Existing mapping fixes

  • Respect mapping specificity when deferred chords compete with immediate standalone actions.
  • Preserve completed chord fallbacks while waiting for higher-priority extensions, instead of losing them to unrelated incomplete combinations.
  • Keep consumed button down/up events balanced when a pending interaction is canceled.
  • Prevent duplicate press reports from starting extra actions or leaving extra active recognizers.
  • Clear expired chord candidates to avoid repeatedly scheduling an elapsed deadline.

Validation

  • make test: 920 application tests and 29 module tests passed.
  • Covered 38,220 engine event sequences, 3,150 transformer event sequences, and 24 configuration/timing combinations.
  • SwiftFormat, SwiftLint, and git diff --check passed for the changed files.
  • Physical mouse testing has not been performed.

@lujjjh lujjjh added the bug Something isn't working label Sep 12, 2026
@lujjjh
lujjjh merged commit ece1597 into main Sep 12, 2026
1 check passed
@lujjjh
lujjjh deleted the fix/repeat-held-button-chords branch September 12, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant