X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=quantum%2Fprocess_keycode%2Fprocess_tap_dance.c;h=f196a9cb6a194a36be1698c4e9422dcd29976a8a;hb=9a91b42e922ed152cb548c529233cf7f2b6d5183;hp=00870c4e7f54b868b1b7bfdd2d43296f9ba2c0d0;hpb=c33434c0d64dd7cbd5f6371c7cb4ac5e05924944;p=qmk_firmware.git diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index 00870c4e7..f196a9cb6 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -47,7 +47,7 @@ void qk_tap_dance_dual_role_finished (qk_tap_dance_state_t *state, void *user_da if (state->count == 1) { register_code16 (pair->kc); } else if (state->count == 2) { - layer_invert (pair->layer); + layer_move (pair->layer); } } @@ -79,6 +79,7 @@ static inline void process_tap_dance_action_on_dance_finished (qk_tap_dance_acti return; action->state.finished = true; add_mods(action->state.oneshot_mods); + add_weak_mods(action->state.weak_mods); send_keyboard_report(); _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_dance_finished); } @@ -87,6 +88,7 @@ static inline void process_tap_dance_action_on_reset (qk_tap_dance_action_t *act { _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_reset); del_mods(action->state.oneshot_mods); + del_weak_mods(action->state.weak_mods); send_keyboard_report(); } @@ -110,6 +112,8 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { action->state.count++; action->state.timer = timer_read(); action->state.oneshot_mods = get_oneshot_mods(); + action->state.weak_mods = get_mods(); + action->state.weak_mods |= get_weak_mods(); process_tap_dance_action_on_each_tap (action); if (last_td && last_td != keycode) {