diff options
author | Jouke Witteveen <j.witteveen@gmail.com> | 2022-06-13 22:12:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-13 22:12:55 +0200 |
commit | 1706da9054f8c4aa77493062a8937a7b64970a9e (patch) | |
tree | 1a77464586942c66bdcae99a26bf1558862a7842 /keyboards/gboards | |
parent | b17324498ee8e7bf1e8ed57cc8c9b505ca0ce85b (diff) |
tap-dance: Restructure code and document in more detail (#16394)
Diffstat (limited to 'keyboards/gboards')
-rw-r--r-- | keyboards/gboards/gergoplex/keymaps/georgepetri/config.h | 2 | ||||
-rw-r--r-- | keyboards/gboards/gergoplex/keymaps/georgepetri/keymap.c | 11 |
2 files changed, 12 insertions, 1 deletions
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 <http://www.gnu.org/licenses/>. #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; + } +} |