diff options
Diffstat (limited to 'quantum/process_keycode/process_tap_dance.c')
-rw-r--r-- | quantum/process_keycode/process_tap_dance.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index b807ec3c3..e58b6f2df 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c | |||
@@ -130,11 +130,17 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { | |||
130 | void matrix_scan_tap_dance () { | 130 | void matrix_scan_tap_dance () { |
131 | if (highest_td == -1) | 131 | if (highest_td == -1) |
132 | return; | 132 | return; |
133 | int tap_user_defined; | ||
133 | 134 | ||
134 | for (int i = 0; i <= highest_td; i++) { | 135 | for (int i = 0; i <= highest_td; i++) { |
135 | qk_tap_dance_action_t *action = &tap_dance_actions[i]; | 136 | qk_tap_dance_action_t *action = &tap_dance_actions[i]; |
136 | 137 | if(action->user_data != NULL ) { | |
137 | if (action->state.count && timer_elapsed (action->state.timer) > TAPPING_TERM) { | 138 | tap_user_defined = (int)action->user_data; |
139 | } | ||
140 | else{ | ||
141 | tap_user_defined = TAPPING_TERM; | ||
142 | } | ||
143 | if (action->state.count && timer_elapsed (action->state.timer) > tap_user_defined) { | ||
138 | process_tap_dance_action_on_dance_finished (action); | 144 | process_tap_dance_action_on_dance_finished (action); |
139 | reset_tap_dance (&action->state); | 145 | reset_tap_dance (&action->state); |
140 | } | 146 | } |