Tap Dance: remove qk_ prefix (#19313)

This commit is contained in:
Ryan
2022-12-15 07:40:25 +11:00
committed by GitHub
parent 83e8e5845a
commit 1978007fae
298 changed files with 1327 additions and 1327 deletions

View File

@@ -8,7 +8,7 @@ enum {
TD_BC = 0
};
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[TD_BC] = ACTION_TAP_DANCE_DOUBLE(KC_B, KC_C)
};

View File

@@ -83,7 +83,7 @@ typedef struct {
bool sticky;
} td_ta_state_t;
static void ang_tap_dance_ta_finished (qk_tap_dance_state_t *state, void *user_data) {
static void ang_tap_dance_ta_finished (tap_dance_state_t *state, void *user_data) {
td_ta_state_t *td_ta = (td_ta_state_t *) user_data;
// if (td_ta->sticky) {
@@ -105,7 +105,7 @@ static void ang_tap_dance_ta_finished (qk_tap_dance_state_t *state, void *user_d
}
// Added this one to make it more reactive on keyup
static void ang_tap_dance_ta_each (qk_tap_dance_state_t *state, void *user_data) {
static void ang_tap_dance_ta_each (tap_dance_state_t *state, void *user_data) {
td_ta_state_t *td_ta = (td_ta_state_t *) user_data;
if (!td_ta->layer_toggle) { // Braces added for clarity
@@ -114,7 +114,7 @@ static void ang_tap_dance_ta_each (qk_tap_dance_state_t *state, void *user_data)
}
static void ang_tap_dance_ta_reset (qk_tap_dance_state_t *state, void *user_data) {
static void ang_tap_dance_ta_reset (tap_dance_state_t *state, void *user_data) {
td_ta_state_t *td_ta = (td_ta_state_t *) user_data;
if (!td_ta->layer_toggle) { // Braces added for clarity
@@ -125,7 +125,7 @@ static void ang_tap_dance_ta_reset (qk_tap_dance_state_t *state, void *user_data
}
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[0] = {
.fn = { ang_tap_dance_ta_each, ang_tap_dance_ta_finished, ang_tap_dance_ta_reset },
.user_data = (void *)&((td_ta_state_t) { false, false })

View File

@@ -160,7 +160,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// Shift vs capslock function. From bbaserdem's Planck keymap.
void caps_tap (qk_tap_dance_state_t *state, void *user_data) {
void caps_tap (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
register_code (KC_LSFT);
} else if (state->count == 2) {
@@ -168,7 +168,7 @@ void caps_tap (qk_tap_dance_state_t *state, void *user_data) {
register_code (KC_CAPS);
}
}
void caps_tap_end (qk_tap_dance_state_t *state, void *user_data) {
void caps_tap_end (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
unregister_code (KC_LSFT);
} else {
@@ -177,7 +177,7 @@ void caps_tap_end (qk_tap_dance_state_t *state, void *user_data) {
}
//Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
//Tap once for Shift, twice for Caps Lock
[SFT_LCK] = ACTION_TAP_DANCE_FN_ADVANCED( caps_tap, NULL, caps_tap_end )
};

View File

@@ -34,7 +34,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
};
void macro_tog_key( qk_tap_dance_state_t *state, void *user_data ) {
void macro_tog_key( tap_dance_state_t *state, void *user_data ) {
if ( state->count > 3 )
return;
@@ -60,7 +60,7 @@ enum {
MCROTOG_ = 0
};
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[MCROTOG_] = ACTION_TAP_DANCE_FN( macro_tog_key )
};

View File

@@ -19,7 +19,7 @@ enum {
};
//Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
//Tap once for Esc, twice Ctrl+Alt+Del
[TD_ESC_RUPT] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, LALT(LCTL(KC_DEL))),
[TD_TAB] = ACTION_TAP_DANCE_DOUBLE(KC_LCTL, LGUI(KC_TAB))

View File

@@ -39,7 +39,7 @@ enum {
void dance_a_accent (qk_tap_dance_state_t *state, void *user_data) {
void dance_a_accent (tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
tap_code (KC_0);
}
@@ -47,7 +47,7 @@ void dance_a_accent (qk_tap_dance_state_t *state, void *user_data) {
tap_code (KC_Q);
}
}
void dance_e_accent (qk_tap_dance_state_t *state, void *user_data) {
void dance_e_accent (tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
tap_code (KC_2);
}
@@ -58,7 +58,7 @@ void dance_e_accent (qk_tap_dance_state_t *state, void *user_data) {
tap_code (KC_E);
}
}
void dance_i_accent (qk_tap_dance_state_t *state, void *user_data) {
void dance_i_accent (tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
tap_code (KC_NUM_LOCK);
register_code (KC_LALT);
@@ -74,7 +74,7 @@ void dance_i_accent (qk_tap_dance_state_t *state, void *user_data) {
}
}
void dance_o_accent (qk_tap_dance_state_t *state, void *user_data) {
void dance_o_accent (tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
tap_code (KC_NUM_LOCK);
register_code (KC_LALT);
@@ -89,7 +89,7 @@ void dance_o_accent (qk_tap_dance_state_t *state, void *user_data) {
tap_code (KC_O);
}
}
void dance_u_accent (qk_tap_dance_state_t *state, void *user_data) {
void dance_u_accent (tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
tap_code (KC_NUM_LOCK);
register_code (KC_LALT);
@@ -105,7 +105,7 @@ void dance_u_accent (qk_tap_dance_state_t *state, void *user_data) {
}
}
void dance_slash (qk_tap_dance_state_t *state, void *user_data) {
void dance_slash (tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
tap_code (KC_NUM_LOCK);
register_code (KC_LALT);
@@ -119,7 +119,7 @@ void dance_slash (qk_tap_dance_state_t *state, void *user_data) {
tap_code (KC_PSLS);
}
}
void dance_under (qk_tap_dance_state_t *state, void *user_data) {
void dance_under (tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
tap_code (KC_NUM_LOCK);
register_code (KC_LALT);
@@ -133,7 +133,7 @@ void dance_under (qk_tap_dance_state_t *state, void *user_data) {
tap_code (KC_6);
}
}
void dance_open_accol (qk_tap_dance_state_t *state, void *user_data) {
void dance_open_accol (tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
tap_code (KC_NUM_LOCK);
register_code (KC_LALT);
@@ -157,7 +157,7 @@ void dance_open_accol (qk_tap_dance_state_t *state, void *user_data) {
tap_code (KC_5);
}
}
void dance_close_accol (qk_tap_dance_state_t *state, void *user_data) {
void dance_close_accol (tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
tap_code (KC_NUM_LOCK);
register_code (KC_LALT);
@@ -182,7 +182,7 @@ void dance_close_accol (qk_tap_dance_state_t *state, void *user_data) {
tap_code (KC_MINS);
}
}
void dance_question (qk_tap_dance_state_t *state, void *user_data) {
void dance_question (tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
tap_code (KC_NUM_LOCK);
register_code (KC_LALT);
@@ -206,7 +206,7 @@ void dance_question (qk_tap_dance_state_t *state, void *user_data) {
}
}
void dance_cedille (qk_tap_dance_state_t *state, void *user_data) {
void dance_cedille (tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
tap_code (KC_9);
}
@@ -214,7 +214,7 @@ void dance_cedille (qk_tap_dance_state_t *state, void *user_data) {
tap_code (KC_C);
}
}
void dance_dot (qk_tap_dance_state_t *state, void *user_data) {
void dance_dot (tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
tap_code (KC_NUM_LOCK);
register_code (KC_LALT);
@@ -234,7 +234,7 @@ void dance_dot (qk_tap_dance_state_t *state, void *user_data) {
tap_code (KC_NUM_LOCK);
}
}
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[TD_A] = ACTION_TAP_DANCE_FN(dance_a_accent),
[TD_E] = ACTION_TAP_DANCE_FN(dance_e_accent),
[TD_I] = ACTION_TAP_DANCE_FN(dance_i_accent),

View File

@@ -13,9 +13,9 @@ typedef enum {
} td_state_t;
static td_state_t td_state = NONE_NONE;
int cur_dance (qk_tap_dance_state_t *state);
void altlp_finished (qk_tap_dance_state_t *state, void *user_data);
void altlp_reset (qk_tap_dance_state_t *state, void *user_data);
int cur_dance (tap_dance_state_t *state);
void altlp_finished (tap_dance_state_t *state, void *user_data);
void altlp_reset (tap_dance_state_t *state, void *user_data);
// Four differend underglow states for 2 language layouts x 2 states of colemak layer
enum layer_states {
@@ -65,7 +65,7 @@ void update_led_state_c(void) {
}
}
int cur_dance (qk_tap_dance_state_t *state) {
int cur_dance (tap_dance_state_t *state) {
if (state->count == 1) {
if (state->interrupted && state->pressed) { return SINGLE_HOLD; }
else if (!state->pressed) { return SINGLE_TAP; }
@@ -76,7 +76,7 @@ int cur_dance (qk_tap_dance_state_t *state) {
}
// Tapdance code stolen long time ago from one of the forum answers i found related to my problem, sadly can't provide link for the credits
void lesc_finished (qk_tap_dance_state_t *state, void *user_data) {
void lesc_finished (tap_dance_state_t *state, void *user_data) {
td_state = cur_dance(state);
switch (td_state) {
case SINGLE_TAP:
@@ -94,7 +94,7 @@ void lesc_finished (qk_tap_dance_state_t *state, void *user_data) {
}
}
void lesc_reset (qk_tap_dance_state_t *state, void *user_data) {
void lesc_reset (tap_dance_state_t *state, void *user_data) {
switch (td_state) {
case SINGLE_TAP:
unregister_code16(KC_ESC);
@@ -115,7 +115,7 @@ void lesc_reset (qk_tap_dance_state_t *state, void *user_data) {
update_led_state_c();
}
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[LESC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lesc_finished, lesc_reset)
};

View File

@@ -48,7 +48,7 @@ enum {
};
//Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
//Tap once for Esc, twice for Caps Lock
[TD_LOCK_SLEEP] = ACTION_TAP_DANCE_DOUBLE(LGUI(KC_L), KC_SLEP),
[TD_ABK] = ACTION_TAP_DANCE_DOUBLE(KC_LABK,KC_RABK),