Register the interrupting keycode in the tap dance state struct
This commit is contained in:
parent
46b4b4407f
commit
3ddec14eb8
@ -131,6 +131,7 @@ void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record) {
|
|||||||
if (keycode == action->state.keycode && keycode == last_td)
|
if (keycode == action->state.keycode && keycode == last_td)
|
||||||
continue;
|
continue;
|
||||||
action->state.interrupted = true;
|
action->state.interrupted = true;
|
||||||
|
action->state.interrupting_keycode = keycode;
|
||||||
process_tap_dance_action_on_dance_finished (action);
|
process_tap_dance_action_on_dance_finished (action);
|
||||||
reset_tap_dance (&action->state);
|
reset_tap_dance (&action->state);
|
||||||
}
|
}
|
||||||
@ -209,5 +210,6 @@ void reset_tap_dance (qk_tap_dance_state_t *state) {
|
|||||||
state->count = 0;
|
state->count = 0;
|
||||||
state->interrupted = false;
|
state->interrupted = false;
|
||||||
state->finished = false;
|
state->finished = false;
|
||||||
|
state->interrupting_keycode = 0;
|
||||||
last_td = 0;
|
last_td = 0;
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,7 @@ typedef struct
|
|||||||
uint8_t oneshot_mods;
|
uint8_t oneshot_mods;
|
||||||
uint8_t weak_mods;
|
uint8_t weak_mods;
|
||||||
uint16_t keycode;
|
uint16_t keycode;
|
||||||
|
uint16_t interrupting_keycode;
|
||||||
uint16_t timer;
|
uint16_t timer;
|
||||||
bool interrupted;
|
bool interrupted;
|
||||||
bool pressed;
|
bool pressed;
|
||||||
|
Loading…
Reference in New Issue
Block a user