]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
in the default case, it should be called if there is actually a tap
authorPavlos Vinieratos <pvinis@gmail.com>
Mon, 18 Jul 2016 21:34:02 +0000 (23:34 +0200)
committerPavlos Vinieratos <pvinis@gmail.com>
Mon, 18 Jul 2016 21:34:02 +0000 (23:34 +0200)
dance happening, and in the normal case, it should be called when the
tap down is happening.

quantum/process_keycode/process_tap_dance.c

index 93b326b5fcb157038b4373646ce531f539945994..bab6bb81b36ef05fbbe60e3a7a084d266ef7d380 100644 (file)
@@ -70,7 +70,6 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
 
   switch(keycode) {
   case QK_TAP_DANCE ... QK_TAP_DANCE_MAX:
-    process_tap_dance_action_on_each_tap (qk_tap_dance_state.keycode);
     if (qk_tap_dance_state.keycode && qk_tap_dance_state.keycode != keycode) {
       process_tap_dance_action_on_dance_finished (qk_tap_dance_state.keycode);
     } else {
@@ -81,12 +80,13 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
       qk_tap_dance_state.keycode = keycode;
       qk_tap_dance_state.timer = timer_read ();
       qk_tap_dance_state.count++;
+      process_tap_dance_action_on_each_tap (qk_tap_dance_state.keycode);
     }
     break;
 
   default:
-    process_tap_dance_action_on_each_tap (qk_tap_dance_state.keycode);
     if (qk_tap_dance_state.keycode) {
+      process_tap_dance_action_on_each_tap (qk_tap_dance_state.keycode);
       process_tap_dance_action_on_dance_finished (qk_tap_dance_state.keycode);
       reset_tap_dance (&qk_tap_dance_state);
     }