aboutsummaryrefslogtreecommitdiff
path: root/quantum/process_keycode/process_tap_dance.c
diff options
context:
space:
mode:
authorPavlos Vinieratos <pvinis@gmail.com>2016-07-18 23:34:02 +0200
committerPavlos Vinieratos <pvinis@gmail.com>2016-07-18 23:34:02 +0200
commitdda2fd6ff3984ed96f8275c661b47a0484f9ee18 (patch)
tree366a87e2e0687b3befc1999f6cf5eed0a39602e8 /quantum/process_keycode/process_tap_dance.c
parentd3091faf363afc8fef73ddf4948f872439b0e827 (diff)
downloadqmk_firmware-dda2fd6ff3984ed96f8275c661b47a0484f9ee18.tar.gz
qmk_firmware-dda2fd6ff3984ed96f8275c661b47a0484f9ee18.zip
in the default case, it should be called if there is actually a tap
dance happening, and in the normal case, it should be called when the tap down is happening.
Diffstat (limited to 'quantum/process_keycode/process_tap_dance.c')
-rw-r--r--quantum/process_keycode/process_tap_dance.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c
index 93b326b5f..bab6bb81b 100644
--- a/quantum/process_keycode/process_tap_dance.c
+++ b/quantum/process_keycode/process_tap_dance.c
@@ -70,7 +70,6 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
70 70
71 switch(keycode) { 71 switch(keycode) {
72 case QK_TAP_DANCE ... QK_TAP_DANCE_MAX: 72 case QK_TAP_DANCE ... QK_TAP_DANCE_MAX:
73 process_tap_dance_action_on_each_tap (qk_tap_dance_state.keycode);
74 if (qk_tap_dance_state.keycode && qk_tap_dance_state.keycode != keycode) { 73 if (qk_tap_dance_state.keycode && qk_tap_dance_state.keycode != keycode) {
75 process_tap_dance_action_on_dance_finished (qk_tap_dance_state.keycode); 74 process_tap_dance_action_on_dance_finished (qk_tap_dance_state.keycode);
76 } else { 75 } else {
@@ -81,12 +80,13 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
81 qk_tap_dance_state.keycode = keycode; 80 qk_tap_dance_state.keycode = keycode;
82 qk_tap_dance_state.timer = timer_read (); 81 qk_tap_dance_state.timer = timer_read ();
83 qk_tap_dance_state.count++; 82 qk_tap_dance_state.count++;
83 process_tap_dance_action_on_each_tap (qk_tap_dance_state.keycode);
84 } 84 }
85 break; 85 break;
86 86
87 default: 87 default:
88 process_tap_dance_action_on_each_tap (qk_tap_dance_state.keycode);
89 if (qk_tap_dance_state.keycode) { 88 if (qk_tap_dance_state.keycode) {
89 process_tap_dance_action_on_each_tap (qk_tap_dance_state.keycode);
90 process_tap_dance_action_on_dance_finished (qk_tap_dance_state.keycode); 90 process_tap_dance_action_on_dance_finished (qk_tap_dance_state.keycode);
91 reset_tap_dance (&qk_tap_dance_state); 91 reset_tap_dance (&qk_tap_dance_state);
92 } 92 }