summary refs log tree commit diff
path: root/quantum
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2022-09-26 20:49:15 -0700
committerGitHub <noreply@github.com>2022-09-26 20:49:15 -0700
commitd909038b28c553f5eb0ecec74f58792155c4d49d (patch)
tree2827cb7325a599136f2e0a571c0b255a26c3ae57 /quantum
parentce0cd17a13163dbf3b6ed8b16230ae07a70eb361 (diff)
Move Oneshot mod callbacks to after mods are set (#18101)
Diffstat (limited to 'quantum')
-rw-r--r--quantum/action.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/quantum/action.c b/quantum/action.c
index 6b2e9104e0..a1476131b9 100644
--- a/quantum/action.c
+++ b/quantum/action.c
@@ -403,9 +403,9 @@ void process_action(keyrecord_t *record, action_t action) {
 #        if defined(ONESHOT_TAP_TOGGLE) && ONESHOT_TAP_TOGGLE > 1
                             } else if (tap_count == ONESHOT_TAP_TOGGLE) {
                                 dprint("MODS_TAP: Toggling oneshot");
+                                register_mods(mods);
                                 clear_oneshot_mods();
                                 set_oneshot_locked_mods(mods | get_oneshot_locked_mods());
-                                register_mods(mods);
 #        endif
                             } else {
                                 register_mods(mods | get_oneshot_mods());
@@ -418,16 +418,16 @@ void process_action(keyrecord_t *record, action_t action) {
                                 // Retain Oneshot mods
 #        if defined(ONESHOT_TAP_TOGGLE) && ONESHOT_TAP_TOGGLE > 1
                                 if (mods & get_mods()) {
+                                    unregister_mods(mods);
                                     clear_oneshot_mods();
                                     set_oneshot_locked_mods(~mods & get_oneshot_locked_mods());
-                                    unregister_mods(mods);
                                 }
                             } else if (tap_count == ONESHOT_TAP_TOGGLE) {
                                 // Toggle Oneshot Layer
 #        endif
                             } else {
-                                clear_oneshot_mods();
                                 unregister_mods(mods);
+                                clear_oneshot_mods();
                             }
                         }
                     }