mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-04-08 23:05:43 +00:00
Added support for case where ONESHOT_TAP_TOGGLE is unset
This commit is contained in:
parent
399f17f84b
commit
f24a2b6127
@ -665,18 +665,18 @@ 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 if (get_oneshot_layer() != action.layer_tap.val) {
|
||||
layer_off(action.layer_tap.val);
|
||||
} else {
|
||||
clear_oneshot_layer_state(ONESHOT_PRESSED);
|
||||
}
|
||||
}
|
||||
}
|
||||
# else
|
||||
if (event.pressed) {
|
||||
layer_on(action.layer_tap.val);
|
||||
set_oneshot_layer(action.layer_tap.val, ONESHOT_START);
|
||||
} else if (get_oneshot_layer() != action.layer_tap.val) {
|
||||
layer_off(action.layer_tap.val);
|
||||
} else {
|
||||
clear_oneshot_layer_state(ONESHOT_PRESSED);
|
||||
if (tap_count > 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user