summaryrefslogtreecommitdiff
path: root/quantum/process_keycode/process_tap_dance.c
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2023-12-24 06:52:41 +0000
committerGitHub <noreply@github.com>2023-12-24 06:52:41 +0000
commitb824faca71e1db86c158a0e09f225410c1e7e0a8 (patch)
tree21a77608c53feb71dea650714cf794cc42e4a4ae /quantum/process_keycode/process_tap_dance.c
parent03848bb3aae551b11dd3da5ee33a41f2f1543a33 (diff)
Align location of tap dance keycode (#22742)
Diffstat (limited to 'quantum/process_keycode/process_tap_dance.c')
-rw-r--r--quantum/process_keycode/process_tap_dance.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c
index b8a8d32f35..ce3b8fc81f 100644
--- a/quantum/process_keycode/process_tap_dance.c
+++ b/quantum/process_keycode/process_tap_dance.c
@@ -133,7 +133,7 @@ bool preprocess_tap_dance(uint16_t keycode, keyrecord_t *record) {
133 133
134 if (!active_td || keycode == active_td) return false; 134 if (!active_td || keycode == active_td) return false;
135 135
136 action = &tap_dance_actions[TD_INDEX(active_td)]; 136 action = &tap_dance_actions[QK_TAP_DANCE_GET_INDEX(active_td)];
137 action->state.interrupted = true; 137 action->state.interrupted = true;
138 action->state.interrupting_keycode = keycode; 138 action->state.interrupting_keycode = keycode;
139 process_tap_dance_action_on_dance_finished(action); 139 process_tap_dance_action_on_dance_finished(action);
@@ -154,7 +154,7 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
154 154
155 switch (keycode) { 155 switch (keycode) {
156 case QK_TAP_DANCE ... QK_TAP_DANCE_MAX: 156 case QK_TAP_DANCE ... QK_TAP_DANCE_MAX:
157 action = &tap_dance_actions[TD_INDEX(keycode)]; 157 action = &tap_dance_actions[QK_TAP_DANCE_GET_INDEX(keycode)];
158 158
159 action->state.pressed = record->event.pressed; 159 action->state.pressed = record->event.pressed;
160 if (record->event.pressed) { 160 if (record->event.pressed) {
@@ -182,7 +182,7 @@ void tap_dance_task(void) {
182 182
183 if (!active_td || timer_elapsed(last_tap_time) <= GET_TAPPING_TERM(active_td, &(keyrecord_t){})) return; 183 if (!active_td || timer_elapsed(last_tap_time) <= GET_TAPPING_TERM(active_td, &(keyrecord_t){})) return;
184 184
185 action = &tap_dance_actions[TD_INDEX(active_td)]; 185 action = &tap_dance_actions[QK_TAP_DANCE_GET_INDEX(active_td)];
186 if (!action->state.interrupted) { 186 if (!action->state.interrupted) {
187 process_tap_dance_action_on_dance_finished(action); 187 process_tap_dance_action_on_dance_finished(action);
188 } 188 }