aboutsummaryrefslogtreecommitdiffstats
path: root/quantum/process_keycode/process_tap_dance.h
diff options
context:
space:
mode:
authorGravatar Nick Choi <iinikchi@gmail.com>2017-05-25 16:26:30 -0400
committerGravatar Nick Choi <iinikchi@gmail.com>2017-05-25 16:26:30 -0400
commitaeb3a34636c614cd392cfc6268491a51a461df31 (patch)
tree4395604c2c6bd7d9adb0f1eb0d99b2f536eec88f /quantum/process_keycode/process_tap_dance.h
parente695b5a33b97cfb4f9dd8bc8ecaff8aa7e0f14cc (diff)
downloadqmk_firmware-aeb3a34636c614cd392cfc6268491a51a461df31.tar.gz
moved specific tap term to its own function
included custom_tapping_term in action struct
Diffstat (limited to 'quantum/process_keycode/process_tap_dance.h')
-rw-r--r--quantum/process_keycode/process_tap_dance.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h
index 95d51f480..a020f7991 100644
--- a/quantum/process_keycode/process_tap_dance.h
+++ b/quantum/process_keycode/process_tap_dance.h
@@ -44,6 +44,7 @@ typedef struct
qk_tap_dance_user_fn_t on_reset;
} fn;
qk_tap_dance_state_t state;
+ uint16_t custom_tapping_term;
void *user_data;
} qk_tap_dance_action_t;
@@ -63,9 +64,16 @@ typedef struct
.user_data = NULL, \
}
-#define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset, tap_specific_tapping_term) { \
+#define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset) { \
.fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset }, \
- .user_data = (void *)(tap_specific_tapping_term), \
+ .user_data = NULL, \
+ .custom_tapping_term = -1, \
+ }
+
+#define ACTION_TAP_DANCE_FN_ADVANCED_TIME(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset, tap_specific_tapping_term) { \
+ .fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset }, \
+ .user_data = NULL, \
+ .custom_tapping_term = tap_specific_tapping_term, \
}
extern qk_tap_dance_action_t tap_dance_actions[];