diff options
Diffstat (limited to 'users/hvp/tap_dances.c')
-rw-r--r-- | users/hvp/tap_dances.c | 66 |
1 files changed, 47 insertions, 19 deletions
diff --git a/users/hvp/tap_dances.c b/users/hvp/tap_dances.c index bb102b30ab..1269d5f272 100644 --- a/users/hvp/tap_dances.c +++ b/users/hvp/tap_dances.c @@ -6,10 +6,7 @@ void dance_1_finished(qk_tap_dance_state_t *state, void *user_data) { if (state->count == 2) { tap_code(KC_SCLN); } else { - register_code(KC_RALT); - register_code(KC_O); - unregister_code(KC_RALT); - unregister_code(KC_O); + tap_code16(ALGR(KC_A)); } } @@ -17,8 +14,7 @@ void dance_1_reset(qk_tap_dance_state_t *state, void *user_data) { if (state->count == 2) { unregister_code(KC_SCLN); } else { - unregister_code(KC_RALT); - unregister_code(KC_O); + unregister_code16(ALGR(KC_A)); } } @@ -27,10 +23,7 @@ void dance_2_finished(qk_tap_dance_state_t *state, void *user_data) { if (state->count == 2) { tap_code(KC_QUOT); } else { - register_code(KC_RALT); - register_code(KC_A); - unregister_code(KC_RALT); - unregister_code(KC_A); + tap_code16(ALGR(KC_W)); } } @@ -38,8 +31,7 @@ void dance_2_reset(qk_tap_dance_state_t *state, void *user_data) { if (state->count == 2) { unregister_code(KC_QUOT); } else { - unregister_code(KC_RALT); - unregister_code(KC_A); + unregister_code16(ALGR(KC_W)); } } @@ -49,10 +41,7 @@ void dance_3_finished(qk_tap_dance_state_t *state, void *user_data) { if (state->count == 2) { tap_code(KC_SLSH); } else { - register_code(KC_RALT); - register_code(KC_W); - unregister_code(KC_RALT); - unregister_code(KC_W); + tap_code16(ALGR(KC_O)); } } @@ -60,8 +49,43 @@ void dance_3_reset(qk_tap_dance_state_t *state, void *user_data) { if (state->count == 2) { unregister_code(KC_SLSH); } else { - unregister_code(KC_RALT); - unregister_code(KC_W); + unregister_code16(ALGR(KC_O)); + } +} + +// Tap dance 4 +void dance_4_finished(qk_tap_dance_state_t *state, void *user_data) { + // if (state->count == 2) + if (state->count == 2) { + tap_code(KC_DOT); + } else { + tap_code16(ALGR(KC_W)); + } +} + +void dance_4_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + unregister_code(KC_DOT); + } else { + unregister_code16(ALGR(KC_W)); + } +} + +// Tap dance 5 +void dance_5_finished(qk_tap_dance_state_t *state, void *user_data) { + // if (state->count == 2) + if (state->count == 2) { + tap_code(KC_DOT); + } else { + tap_code16(ALGR(KC_O)); + } +} + +void dance_5_reset(qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 2) { + unregister_code(KC_DOT); + } else { + unregister_code16(ALGR(KC_O)); } } @@ -72,4 +96,8 @@ qk_tap_dance_action_t tap_dance_actions[] = { [TD2] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_2_finished, dance_2_reset), - [TD3] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_3_finished, dance_3_reset)};
\ No newline at end of file + [TD3] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_3_finished, dance_3_reset), + + [TD4] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_4_finished, dance_4_reset), + + [TD5] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_5_finished, dance_5_reset)};
\ No newline at end of file |