diff options
| -rw-r--r-- | quantum/process_keycode/process_tap_dance.c | 4 | ||||
| -rw-r--r-- | quantum/process_keycode/process_tap_dance.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index f1f28e016..f196a9cb6 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c | |||
| @@ -79,6 +79,7 @@ static inline void process_tap_dance_action_on_dance_finished (qk_tap_dance_acti | |||
| 79 | return; | 79 | return; |
| 80 | action->state.finished = true; | 80 | action->state.finished = true; |
| 81 | add_mods(action->state.oneshot_mods); | 81 | add_mods(action->state.oneshot_mods); |
| 82 | add_weak_mods(action->state.weak_mods); | ||
| 82 | send_keyboard_report(); | 83 | send_keyboard_report(); |
| 83 | _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_dance_finished); | 84 | _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_dance_finished); |
| 84 | } | 85 | } |
| @@ -87,6 +88,7 @@ static inline void process_tap_dance_action_on_reset (qk_tap_dance_action_t *act | |||
| 87 | { | 88 | { |
| 88 | _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_reset); | 89 | _process_tap_dance_action_fn (&action->state, action->user_data, action->fn.on_reset); |
| 89 | del_mods(action->state.oneshot_mods); | 90 | del_mods(action->state.oneshot_mods); |
| 91 | del_weak_mods(action->state.weak_mods); | ||
| 90 | send_keyboard_report(); | 92 | send_keyboard_report(); |
| 91 | } | 93 | } |
| 92 | 94 | ||
| @@ -110,6 +112,8 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { | |||
| 110 | action->state.count++; | 112 | action->state.count++; |
| 111 | action->state.timer = timer_read(); | 113 | action->state.timer = timer_read(); |
| 112 | action->state.oneshot_mods = get_oneshot_mods(); | 114 | action->state.oneshot_mods = get_oneshot_mods(); |
| 115 | action->state.weak_mods = get_mods(); | ||
| 116 | action->state.weak_mods |= get_weak_mods(); | ||
| 113 | process_tap_dance_action_on_each_tap (action); | 117 | process_tap_dance_action_on_each_tap (action); |
| 114 | 118 | ||
| 115 | if (last_td && last_td != keycode) { | 119 | if (last_td && last_td != keycode) { |
diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index 37a27c536..ab20ea04e 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h | |||
| @@ -25,6 +25,7 @@ typedef struct | |||
| 25 | { | 25 | { |
| 26 | uint8_t count; | 26 | uint8_t count; |
| 27 | uint8_t oneshot_mods; | 27 | uint8_t oneshot_mods; |
| 28 | uint8_t weak_mods; | ||
| 28 | uint16_t keycode; | 29 | uint16_t keycode; |
| 29 | uint16_t timer; | 30 | uint16_t timer; |
| 30 | bool interrupted; | 31 | bool interrupted; |
