diff options
Diffstat (limited to 'quantum/process_keycode')
| -rw-r--r-- | quantum/process_keycode/process_tap_dance.c | 1 | ||||
| -rw-r--r-- | quantum/process_keycode/process_tap_dance.h | 10 |
2 files changed, 7 insertions, 4 deletions
diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index 79ade4d00..6ae362c4c 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c | |||
| @@ -70,6 +70,7 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { | |||
| 70 | action->state.keycode = keycode; | 70 | action->state.keycode = keycode; |
| 71 | action->state.count++; | 71 | action->state.count++; |
| 72 | action->state.timer = timer_read(); | 72 | action->state.timer = timer_read(); |
| 73 | process_tap_dance_action_on_each_tap (action); | ||
| 73 | 74 | ||
| 74 | if (last_td && last_td != keycode) { | 75 | if (last_td && last_td != keycode) { |
| 75 | qk_tap_dance_action_t *paction = &tap_dance_actions[last_td - QK_TAP_DANCE]; | 76 | qk_tap_dance_action_t *paction = &tap_dance_actions[last_td - QK_TAP_DANCE]; |
diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index d7b857bdc..f753cbba6 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h | |||
| @@ -39,15 +39,17 @@ typedef struct | |||
| 39 | 39 | ||
| 40 | #define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) { \ | 40 | #define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) { \ |
| 41 | .fn = { NULL, qk_tap_dance_pair_finished, qk_tap_dance_pair_reset }, \ | 41 | .fn = { NULL, qk_tap_dance_pair_finished, qk_tap_dance_pair_reset }, \ |
| 42 | .user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }) \ | 42 | .user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }), \ |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | #define ACTION_TAP_DANCE_FN(user_fn) { \ | 45 | #define ACTION_TAP_DANCE_FN(user_fn) { \ |
| 46 | .fn = { NULL, user_fn, NULL } \ | 46 | .fn = { NULL, user_fn, NULL }, \ |
| 47 | .user_data = NULL, \ | ||
| 47 | } | 48 | } |
| 48 | 49 | ||
| 49 | #define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_reset) { \ | 50 | #define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset) { \ |
| 50 | .fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_reset } \ | 51 | .fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset }, \ |
| 52 | .user_data = NULL, \ | ||
| 51 | } | 53 | } |
| 52 | 54 | ||
| 53 | extern qk_tap_dance_action_t tap_dance_actions[]; | 55 | extern qk_tap_dance_action_t tap_dance_actions[]; |
