summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiuseppe Rota <rota.giuseppe@gmail.com>2018-12-29 15:48:01 +0100
committerDrashna Jaelre <drashna@live.com>2018-12-30 17:35:12 +0100
commit3ddec14eb8c1b666df381573c6db8a4b2fda035f (patch)
treeb477d5a530984e49fd797243d24edd7103410307
parent46b4b4407ff6e23d0799b0f902e61f1fe3645a9a (diff)
downloadqmk_firmware-3ddec14eb8c1b666df381573c6db8a4b2fda035f.tar.gz
qmk_firmware-3ddec14eb8c1b666df381573c6db8a4b2fda035f.tar.xz
Register the interrupting keycode in the tap dance state struct
-rw-r--r--quantum/process_keycode/process_tap_dance.c2
-rw-r--r--quantum/process_keycode/process_tap_dance.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c
index b55ace5ba..16d33ddde 100644
--- a/quantum/process_keycode/process_tap_dance.c
+++ b/quantum/process_keycode/process_tap_dance.c
@@ -131,6 +131,7 @@ void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record) {
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);
}
@@ -209,5 +210,6 @@ void reset_tap_dance (qk_tap_dance_state_t *state) {
state->count = 0;
state->interrupted = false;
state->finished = false;
+ state->interrupting_keycode = 0;
last_td = 0;
}
diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h
index 8b0a47c49..ca12f4746 100644
--- a/quantum/process_keycode/process_tap_dance.h
+++ b/quantum/process_keycode/process_tap_dance.h
@@ -27,6 +27,7 @@ typedef struct
uint8_t oneshot_mods;
uint8_t weak_mods;
uint16_t keycode;
+ uint16_t interrupting_keycode;
uint16_t timer;
bool interrupted;
bool pressed;