Move Oneshot mod callbacks to after mods are set (#18101)
This commit is contained in:
parent
ce0cd17a13
commit
d909038b28
1 changed files with 3 additions and 3 deletions
|
@ -403,9 +403,9 @@ void process_action(keyrecord_t *record, action_t action) {
|
||||||
# if defined(ONESHOT_TAP_TOGGLE) && ONESHOT_TAP_TOGGLE > 1
|
# if defined(ONESHOT_TAP_TOGGLE) && ONESHOT_TAP_TOGGLE > 1
|
||||||
} else if (tap_count == ONESHOT_TAP_TOGGLE) {
|
} else if (tap_count == ONESHOT_TAP_TOGGLE) {
|
||||||
dprint("MODS_TAP: Toggling oneshot");
|
dprint("MODS_TAP: Toggling oneshot");
|
||||||
|
register_mods(mods);
|
||||||
clear_oneshot_mods();
|
clear_oneshot_mods();
|
||||||
set_oneshot_locked_mods(mods | get_oneshot_locked_mods());
|
set_oneshot_locked_mods(mods | get_oneshot_locked_mods());
|
||||||
register_mods(mods);
|
|
||||||
# endif
|
# endif
|
||||||
} else {
|
} else {
|
||||||
register_mods(mods | get_oneshot_mods());
|
register_mods(mods | get_oneshot_mods());
|
||||||
|
@ -418,16 +418,16 @@ void process_action(keyrecord_t *record, action_t action) {
|
||||||
// Retain Oneshot mods
|
// Retain Oneshot mods
|
||||||
# if defined(ONESHOT_TAP_TOGGLE) && ONESHOT_TAP_TOGGLE > 1
|
# if defined(ONESHOT_TAP_TOGGLE) && ONESHOT_TAP_TOGGLE > 1
|
||||||
if (mods & get_mods()) {
|
if (mods & get_mods()) {
|
||||||
|
unregister_mods(mods);
|
||||||
clear_oneshot_mods();
|
clear_oneshot_mods();
|
||||||
set_oneshot_locked_mods(~mods & get_oneshot_locked_mods());
|
set_oneshot_locked_mods(~mods & get_oneshot_locked_mods());
|
||||||
unregister_mods(mods);
|
|
||||||
}
|
}
|
||||||
} else if (tap_count == ONESHOT_TAP_TOGGLE) {
|
} else if (tap_count == ONESHOT_TAP_TOGGLE) {
|
||||||
// Toggle Oneshot Layer
|
// Toggle Oneshot Layer
|
||||||
# endif
|
# endif
|
||||||
} else {
|
} else {
|
||||||
clear_oneshot_mods();
|
|
||||||
unregister_mods(mods);
|
unregister_mods(mods);
|
||||||
|
clear_oneshot_mods();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue