summaryrefslogtreecommitdiff
path: root/quantum/process_keycode/process_tap_dance.h
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/process_keycode/process_tap_dance.h')
-rw-r--r--quantum/process_keycode/process_tap_dance.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h
index 5cccbdf439..5a972cee5a 100644
--- a/quantum/process_keycode/process_tap_dance.h
+++ b/quantum/process_keycode/process_tap_dance.h
@@ -28,15 +28,16 @@ typedef struct {
28#ifndef NO_ACTION_ONESHOT 28#ifndef NO_ACTION_ONESHOT
29 uint8_t oneshot_mods; 29 uint8_t oneshot_mods;
30#endif 30#endif
31 bool pressed : 1; 31 bool pressed : 1;
32 bool finished : 1; 32 bool finished : 1;
33 bool interrupted : 1; 33 bool interrupted : 1;
34 bool in_use : 1;
35 uint8_t index;
34} tap_dance_state_t; 36} tap_dance_state_t;
35 37
36typedef void (*tap_dance_user_fn_t)(tap_dance_state_t *state, void *user_data); 38typedef void (*tap_dance_user_fn_t)(tap_dance_state_t *state, void *user_data);
37 39
38typedef struct tap_dance_action_t { 40typedef struct tap_dance_action_t {
39 tap_dance_state_t state;
40 struct { 41 struct {
41 tap_dance_user_fn_t on_each_tap; 42 tap_dance_user_fn_t on_each_tap;
42 tap_dance_user_fn_t on_dance_finished; 43 tap_dance_user_fn_t on_dance_finished;
@@ -80,6 +81,8 @@ typedef struct {
80 81
81void reset_tap_dance(tap_dance_state_t *state); 82void reset_tap_dance(tap_dance_state_t *state);
82 83
84tap_dance_state_t *tap_dance_get_state(uint8_t tap_dance_idx);
85
83/* To be used internally */ 86/* To be used internally */
84 87
85bool preprocess_tap_dance(uint16_t keycode, keyrecord_t *record); 88bool preprocess_tap_dance(uint16_t keycode, keyrecord_t *record);