diff options
Diffstat (limited to 'users/edvorakjp')
-rw-r--r-- | users/edvorakjp/edvorakjp.c | 2 | ||||
-rw-r--r-- | users/edvorakjp/edvorakjp.h | 2 | ||||
-rw-r--r-- | users/edvorakjp/edvorakjp_tap_dance.c | 13 |
3 files changed, 13 insertions, 4 deletions
diff --git a/users/edvorakjp/edvorakjp.c b/users/edvorakjp/edvorakjp.c index c44d8bb440..c95b03d981 100644 --- a/users/edvorakjp/edvorakjp.c +++ b/users/edvorakjp/edvorakjp.c @@ -12,7 +12,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { return layer_state_set_keymap(state); } -__attribute__((weak)) uint32_t layer_state_set_keymap(uint32_t state) { return state; } +__attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user_result = process_record_keymap(keycode, record) && process_record_edvorakjp_swap_scln(keycode, record) && process_record_edvorakjp_config(keycode, record) && process_record_layer(keycode, record) && process_record_ime(keycode, record); diff --git a/users/edvorakjp/edvorakjp.h b/users/edvorakjp/edvorakjp.h index 93cd9851b7..a878f71ca8 100644 --- a/users/edvorakjp/edvorakjp.h +++ b/users/edvorakjp/edvorakjp.h @@ -68,7 +68,7 @@ enum tap_dance_code { void matrix_init_user(void); void matrix_init_keymap(void); layer_state_t layer_state_set_user(layer_state_t state); -uint32_t layer_state_set_keymap(uint32_t state); +layer_state_t layer_state_set_keymap(layer_state_t state); bool process_record_user(uint16_t keycode, keyrecord_t *record); bool process_record_keymap(uint16_t keycode, keyrecord_t *record); 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; + } +} |