QMK/keyboards/betalupi_voyager/keymaps/default/parts/tapdance.c

27 lines
652 B
C
Raw Normal View History

2023-12-31 10:28:51 -08:00
void td_screenshot(tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
tap_code16(KC_PSCR);
} else if (state->count == 2) {
tap_code16(LSFT(KC_PSCR));
} else if (state->count == 3) {
tap_code16(LALT(KC_PSCR));
} else {
reset_tap_dance(state);
}
}
2024-01-15 10:40:12 -08:00
void td_wmlayout(tap_dance_state_t *state, void *user_data) {
2023-12-31 10:28:51 -08:00
if (state->count == 1) {
2024-01-15 10:40:12 -08:00
tap_code16(LGUI(KC_COMMA));
2023-12-31 10:28:51 -08:00
} else if (state->count == 2) {
2024-01-15 10:40:12 -08:00
tap_code16(LGUI(KC_DOT));
2023-12-31 10:28:51 -08:00
} else {
reset_tap_dance(state);
}
}
tap_dance_action_t tap_dance_actions[] = {
[TD_WMLAYOUT] = ACTION_TAP_DANCE_FN(td_wmlayout),
[TD_SCREENSHOT] = ACTION_TAP_DANCE_FN(td_screenshot),
2024-01-15 10:40:12 -08:00
};