2025-05-27 08:49:16 -07:00

58 lines
923 B
C

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);
}
}
void td_wmlayout(tap_dance_state_t *state, void *user_data)
{
if (state->count == 1)
{
tap_code16(LGUI(KC_COMMA));
}
else if (state->count == 2)
{
tap_code16(LGUI(KC_DOT));
}
else
{
reset_tap_dance(state);
}
}
void td_nogame(tap_dance_state_t *state, void *user_data)
{
if (state->count == 1)
{
tap_code16(KC_B);
}
else if (state->count == 2)
{
layer_move(LAYER_MAIN);
}
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),
[TD_NOGAME] = ACTION_TAP_DANCE_FN(td_nogame),
};