diff options
Diffstat (limited to 'quantum/process_keycode/process_tap_dance.c')
| -rw-r--r-- | quantum/process_keycode/process_tap_dance.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index 6ae362c4c..403dca538 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c | |||
| @@ -43,12 +43,16 @@ static inline void process_tap_dance_action_on_dance_finished (qk_tap_dance_acti | |||
| 43 | if (action->state.finished) | 43 | if (action->state.finished) |
| 44 | return; | 44 | return; |
| 45 | action->state.finished = true; | 45 | action->state.finished = true; |
| 46 | add_mods(action->state.oneshot_mods); | ||
| 47 | send_keyboard_report(); | ||
| 46 | _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_dance_finished); | 48 | _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_dance_finished); |
| 47 | } | 49 | } |
| 48 | 50 | ||
| 49 | static inline void process_tap_dance_action_on_reset (qk_tap_dance_action_t *action) | 51 | static inline void process_tap_dance_action_on_reset (qk_tap_dance_action_t *action) |
| 50 | { | 52 | { |
| 51 | _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_reset); | 53 | _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_reset); |
| 54 | del_mods(action->state.oneshot_mods); | ||
| 55 | send_keyboard_report(); | ||
| 52 | } | 56 | } |
| 53 | 57 | ||
| 54 | bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { | 58 | bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { |
| @@ -70,6 +74,7 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { | |||
| 70 | action->state.keycode = keycode; | 74 | action->state.keycode = keycode; |
| 71 | action->state.count++; | 75 | action->state.count++; |
| 72 | action->state.timer = timer_read(); | 76 | action->state.timer = timer_read(); |
| 77 | action->state.oneshot_mods = get_oneshot_mods(); | ||
| 73 | process_tap_dance_action_on_each_tap (action); | 78 | process_tap_dance_action_on_each_tap (action); |
| 74 | 79 | ||
| 75 | if (last_td && last_td != keycode) { | 80 | if (last_td && last_td != keycode) { |
| @@ -109,7 +114,7 @@ void matrix_scan_tap_dance () { | |||
| 109 | if (highest_td == -1) | 114 | if (highest_td == -1) |
| 110 | return; | 115 | return; |
| 111 | 116 | ||
| 112 | for (int i = 0; i <= highest_td; i++) { | 117 | for (int i = 0; i <= highest_td; i++) { |
| 113 | qk_tap_dance_action_t *action = &tap_dance_actions[i]; | 118 | qk_tap_dance_action_t *action = &tap_dance_actions[i]; |
| 114 | 119 | ||
| 115 | if (action->state.count && timer_elapsed (action->state.timer) > TAPPING_TERM) { | 120 | if (action->state.count && timer_elapsed (action->state.timer) > TAPPING_TERM) { |
