aboutsummaryrefslogtreecommitdiff
path: root/quantum/process_keycode/process_tap_dance.c
diff options
context:
space:
mode:
authorAlex Ong <the.onga@gmail.com>2019-01-04 19:43:45 +1100
committerAlex Ong <the.onga@gmail.com>2019-01-04 19:43:45 +1100
commit2bb2977c133646c4e056960e72029270d77cc1eb (patch)
tree235d491f992121ac1716c5bf2fafb80983748576 /quantum/process_keycode/process_tap_dance.c
parenta55c838961c89097ab849ed6cb1f261791e6b9b4 (diff)
parent47c91fc7f75ae0a477e55b687aa0fc30da0a283c (diff)
downloadqmk_firmware-2bb2977c133646c4e056960e72029270d77cc1eb.tar.gz
qmk_firmware-2bb2977c133646c4e056960e72029270d77cc1eb.zip
Merge branch 'master' into debounce_refactor
# Conflicts: # tmk_core/common/keyboard.c
Diffstat (limited to 'quantum/process_keycode/process_tap_dance.c')
-rw-r--r--quantum/process_keycode/process_tap_dance.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c
index 833780691..16d33ddde 100644
--- a/quantum/process_keycode/process_tap_dance.c
+++ b/quantum/process_keycode/process_tap_dance.c
@@ -16,6 +16,10 @@
16#include "quantum.h" 16#include "quantum.h"
17#include "action_tapping.h" 17#include "action_tapping.h"
18 18
19#ifndef TAPPING_TERM
20#define TAPPING_TERM 200
21#endif
22
19#ifndef NO_ACTION_ONESHOT 23#ifndef NO_ACTION_ONESHOT
20uint8_t get_oneshot_mods(void); 24uint8_t get_oneshot_mods(void);
21#endif 25#endif
@@ -127,6 +131,7 @@ void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record) {
127 if (keycode == action->state.keycode && keycode == last_td) 131 if (keycode == action->state.keycode && keycode == last_td)
128 continue; 132 continue;
129 action->state.interrupted = true; 133 action->state.interrupted = true;
134 action->state.interrupting_keycode = keycode;
130 process_tap_dance_action_on_dance_finished (action); 135 process_tap_dance_action_on_dance_finished (action);
131 reset_tap_dance (&action->state); 136 reset_tap_dance (&action->state);
132 } 137 }
@@ -205,5 +210,6 @@ void reset_tap_dance (qk_tap_dance_state_t *state) {
205 state->count = 0; 210 state->count = 0;
206 state->interrupted = false; 211 state->interrupted = false;
207 state->finished = false; 212 state->finished = false;
213 state->interrupting_keycode = 0;
208 last_td = 0; 214 last_td = 0;
209} 215}