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 /users/edvorakjp | |
parent | b17324498ee8e7bf1e8ed57cc8c9b505ca0ce85b (diff) |
tap-dance: Restructure code and document in more detail (#16394)
Diffstat (limited to 'users/edvorakjp')
-rw-r--r-- | users/edvorakjp/edvorakjp_tap_dance.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/users/edvorakjp/edvorakjp_tap_dance.c b/users/edvorakjp/edvorakjp_tap_dance.c index cee10de693..69fcbac1ca 100644 --- a/users/edvorakjp/edvorakjp_tap_dance.c +++ b/users/edvorakjp/edvorakjp_tap_dance.c @@ -64,6 +64,15 @@ void td_raise_reset(qk_tap_dance_state_t *state, void *user_data) { } qk_tap_dance_action_t tap_dance_actions[] = { - [TD_EDVORAKJP_LOWER] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, td_lower_finished, td_lower_reset, 150), - [TD_EDVORAKJP_RAISE] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, td_raise_finished, td_raise_reset, 150), + [TD_EDVORAKJP_LOWER] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, td_lower_finished, td_lower_reset), + [TD_EDVORAKJP_RAISE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, td_raise_finished, td_raise_reset), }; + +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QK_TAP_DANCE ... QK_TAP_DANCE_MAX: + return 150; + default: + return TAPPING_TERM; + } +} |