-
-
Notifications
You must be signed in to change notification settings - Fork 39.2k
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 OSMs getting stuck #20034
Fix OSMs getting stuck #20034
Conversation
Could you add tests to verify that this behavior is being processed correctly? (you can see some tests in |
Before writing new tests I wanted to see what the existing tests say, but they said no. Any pointers how to get them running on a M1 Mac?
|
Nope, clang doesn't like the tests. |
Not for M1, but on mac, I've always had to do: make test:basic CC=/usr/local/bin/gcc-12 Because, yeah, like fauxpark said, clang doesn't like the tests. |
Added three tests for:
Also verified that the two latter tests failed on the master branch as they should. |
@kasimir-k Thank you for your hard, clean work on this! I really appreciate it. Very nice! |
Description
This PR fixes OSMs getting stuck with double tapping or holding another mod. The bug was caused by
oneshot_mods
being converted to regular mods withregisted_mods
and thus loosing possibility to unregister those mods, and also not clearing the mods.The commits of this PR are:
ONESHOT_TAP_TOGGLE
functionality, single tap and double tap (or n-tap) should be treated equallyONESHOT_TAP_TOGGLE
del_oneshot_locked_mods()
: improves readability overset_oneshot_locked_mods(~mods & get_oneshot_locked_mods());
and also makes it clearer that releasing a held mod unlocks it, if it was lockedadd_oneshot_locked_mods()
: align utils for locked mods with other mods utilsTypes of Changes
Issues Fixed or Closed by This PR
Checklist