summaryrefslogtreecommitdiff
path: root/quantum/process_keycode/process_tap_dance.c
diff options
context:
space:
mode:
authorcoderkun <olli@coderkun.de>2016-10-02 10:04:29 +0200
committercoderkun <olli@coderkun.de>2016-10-02 10:04:29 +0200
commit8655677584483e46d9b45873aa50ec6e860486dd (patch)
tree3f1037d47607fd40be82fe9169795978f8f3551f /quantum/process_keycode/process_tap_dance.c
parenta10e100bd5e8bad73e1b04f54639a4cec36e4b9e (diff)
parent35e6870e5c8943c044187256e01c96ef400ca067 (diff)
Merge branch 'master' into coderkun_neo2
Diffstat (limited to 'quantum/process_keycode/process_tap_dance.c')
-rw-r--r--quantum/process_keycode/process_tap_dance.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c
index 07de3ecb8f..6ae362c4c2 100644
--- a/quantum/process_keycode/process_tap_dance.c
+++ b/quantum/process_keycode/process_tap_dance.c
@@ -65,11 +65,12 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
highest_td = idx;
action = &tap_dance_actions[idx];
- action->state.keycode = keycode;
action->state.pressed = record->event.pressed;
if (record->event.pressed) {
+ action->state.keycode = keycode;
action->state.count++;
action->state.timer = timer_read();
+ process_tap_dance_action_on_each_tap (action);
if (last_td && last_td != keycode) {
qk_tap_dance_action_t *paction = &tap_dance_actions[last_td - QK_TAP_DANCE];
@@ -77,8 +78,9 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
process_tap_dance_action_on_dance_finished (paction);
reset_tap_dance (&paction->state);
}
+
+ last_td = keycode;
}
- last_td = keycode;
break;