Ensure held OSL is properly released when nesting OSL

This commit is contained in:
Krister Svanlund 2024-01-19 23:28:12 +01:00
parent 548983abc8
commit 399f17f84b

View File

@ -665,8 +665,12 @@ void process_action(keyrecord_t *record, action_t action) {
if (tap_count >= ONESHOT_TAP_TOGGLE) {
reset_oneshot_layer();
set_oneshot_layer(action.layer_tap.val, ONESHOT_TOGGLED);
} else {
if (get_oneshot_layer() != action.layer_tap.val) {
layer_off(action.layer_tap.val);
} else {
clear_oneshot_layer_state(ONESHOT_PRESSED);
}
}
}
# else