Skip to content

fix: Avoid clearing macro 'up' events, leaving buttons stuck on - #650

Merged
pastaq merged 1 commit into
mainfrom
pastaq/sticky_buttons
Aug 21, 2026
Merged

fix: Avoid clearing macro 'up' events, leaving buttons stuck on#650
pastaq merged 1 commit into
mainfrom
pastaq/sticky_buttons

Conversation

@pastaq

@pastaq pastaq commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

PR #623 introduced a bug where macros that were implemented on the target device would have their 'up' events cleared by mistake if the event arrived quickly. This would happen because the queed 'down' event would fire after the up events were unqueued if the up event arrived sooner than the down event fired. That would trigger the debounce and no later up event would fire, leaving the button stuck 'down'.

Avoid the race by triggering the second event to land 1 frame after the first event. While at it, since the delayed ordering is no longer necessary, treat up and down events the same for enqueueing.

PR #623 introduced a bug where macros that were implemented on the
target device would have their 'up' events cleared by mistake if the
event arrived quickly. This would happen because the queed 'down' event
would fire after the up events were unqueued if the up event arrived
sooner than the down event fired. That would trigger the debounce and no
later up event would fire, leaving the button stuck 'down'.

Avoid the race by triggering the second event to land 1 frame after the
first event. While at it, since the delayed ordering is no longer
necessary, treat up and down events the same for enqueueing.
@pastaq
pastaq merged commit f7fe555 into main Aug 21, 2026
6 checks passed
@pastaq
pastaq deleted the pastaq/sticky_buttons branch August 21, 2026 05:43
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.78.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

1 participant