- if (last_td && last_td != keycode) {
- (&tap_dance_actions[last_td - QK_TAP_DANCE])->state.interrupted = true;
+ if (!record->event.pressed)
+ return;
+
+ if (highest_td == -1)
+ return;
+
+ for (int i = 0; i <= highest_td; i++) {
+ action = &tap_dance_actions[i];
+ if (action->state.count) {
+ if (keycode == action->state.keycode && keycode == last_td)
+ continue;
+ action->state.interrupted = true;
+ action->state.interrupting_keycode = keycode;
+ process_tap_dance_action_on_dance_finished (action);
+ reset_tap_dance (&action->state);
+ }