From 1706da9054f8c4aa77493062a8937a7b64970a9e Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Mon, 13 Jun 2022 22:12:55 +0200 Subject: tap-dance: Restructure code and document in more detail (#16394) --- keyboards/gboards/gergoplex/keymaps/georgepetri/config.h | 2 ++ keyboards/gboards/gergoplex/keymaps/georgepetri/keymap.c | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'keyboards/gboards/gergoplex') diff --git a/keyboards/gboards/gergoplex/keymaps/georgepetri/config.h b/keyboards/gboards/gergoplex/keymaps/georgepetri/config.h index f66c334b85..e2c27583fa 100644 --- a/keyboards/gboards/gergoplex/keymaps/georgepetri/config.h +++ b/keyboards/gboards/gergoplex/keymaps/georgepetri/config.h @@ -27,3 +27,5 @@ along with this program. If not, see . #define COMBO_ALLOW_ACTION_KEYS #define COMBO_VARIABLE_LEN + +#define TAPPING_TERM_PER_KEY diff --git a/keyboards/gboards/gergoplex/keymaps/georgepetri/keymap.c b/keyboards/gboards/gergoplex/keymaps/georgepetri/keymap.c index e3b8944814..8b832cbac8 100644 --- a/keyboards/gboards/gergoplex/keymaps/georgepetri/keymap.c +++ b/keyboards/gboards/gergoplex/keymaps/georgepetri/keymap.c @@ -199,5 +199,14 @@ void ql_reset(qk_tap_dance_state_t *state, void *user_data) { } qk_tap_dance_action_t tap_dance_actions[] = { - [GAME] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, ql_finished, ql_reset, 275) + [GAME] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ql_finished, ql_reset) }; + +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QK_TAP_DANCE ... QK_TAP_DANCE_MAX: + return 275; + default: + return TAPPING_TERM; + } +} -- cgit v1.2.3