]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Register the interrupting keycode in the tap dance state struct
authorGiuseppe Rota <rota.giuseppe@gmail.com>
Sat, 29 Dec 2018 14:48:01 +0000 (15:48 +0100)
committerDrashna Jaelre <drashna@live.com>
Sun, 30 Dec 2018 16:35:12 +0000 (08:35 -0800)
quantum/process_keycode/process_tap_dance.c
quantum/process_keycode/process_tap_dance.h

index b55ace5ba8372dc7deeadf0235150daaa26074c4..16d33dddeee534471d1e91d9ab8bc7e41fca732c 100644 (file)
@@ -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;
       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);
     }
       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->count = 0;
   state->interrupted = false;
   state->finished = false;
+  state->interrupting_keycode = 0;
   last_td = 0;
 }
   last_td = 0;
 }
index 8b0a47c49b7fd9153d2d39c8abc1e1003f7e6bd3..ca12f4746e33996b3d034503c2befd6fb273277c 100644 (file)
@@ -27,6 +27,7 @@ typedef struct
   uint8_t oneshot_mods;
   uint8_t weak_mods;
   uint16_t keycode;
   uint8_t oneshot_mods;
   uint8_t weak_mods;
   uint16_t keycode;
+  uint16_t interrupting_keycode;
   uint16_t timer;
   bool interrupted;
   bool pressed;
   uint16_t timer;
   bool interrupted;
   bool pressed;