Tap Dance: remove qk_ prefix (#19313)

This commit is contained in:
Ryan 2022-12-15 07:40:25 +11:00 • committed by GitHub
commit 1978007fae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
298 changed files with 1328 additions and 1328 deletions

View file

@ -64,7 +64,7 @@ enum {
};
// Tap Dance definitions
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
// Tap once for Escape, twice for Caps Lock
[TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS),
};
@ -96,14 +96,14 @@ enum {
#### Example 1: Send "Safety Dance!" After 100 Taps :id=example-1
```c
void dance_egg(qk_tap_dance_state_t *state, void *user_data) {
void dance_egg(tap_dance_state_t *state, void *user_data) {
if (state->count >= 100) {
SEND_STRING("Safety dance!");
reset_tap_dance(state);
}
}
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[CT_EGG] = ACTION_TAP_DANCE_FN(dance_egg),
};
```
@ -113,7 +113,7 @@ qk_tap_dance_action_t tap_dance_actions[] = {
```c
// On each tap, light up one LED, from right to left
// On the fourth tap, turn them off from right to left
void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) {
void dance_flsh_each(tap_dance_state_t *state, void *user_data) {
switch (state->count) {
case 1:
ergodox_right_led_3_on();
@ -134,14 +134,14 @@ void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) {
}
// On the fourth tap, set the keyboard on flash state
void dance_flsh_finished(qk_tap_dance_state_t *state, void *user_data) {
void dance_flsh_finished(tap_dance_state_t *state, void *user_data) {
if (state->count >= 4) {
reset_keyboard();
}
}
// If the flash state didn't happen, then turn off LEDs, left to right
void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) {
void dance_flsh_reset(tap_dance_state_t *state, void *user_data) {
ergodox_right_led_1_off();
wait_ms(50);
ergodox_right_led_2_off();
@ -150,7 +150,7 @@ void dance_flsh_reset(qk_tap_dance_state_t *state, void *user_data) {
}
// All tap dances now put together. Example 2 is "CT_FLSH"
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS),
[CT_EGG] = ACTION_TAP_DANCE_FN(dance_egg),
[CT_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED(dance_flsh_each, dance_flsh_finished, dance_flsh_reset)
@ -169,7 +169,7 @@ typedef struct {
} tap_dance_tap_hold_t;
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
qk_tap_dance_action_t *action;
tap_dance_action_t *action;
switch (keycode) {
case TD(CT_CLN): // list all tap dance keycodes with tap-hold configurations
@ -182,7 +182,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void tap_dance_tap_hold_finished(qk_tap_dance_state_t *state, void *user_data) {
void tap_dance_tap_hold_finished(tap_dance_state_t *state, void *user_data) {
tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)user_data;
if (state->pressed) {
@ -200,7 +200,7 @@ void tap_dance_tap_hold_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void tap_dance_tap_hold_reset(qk_tap_dance_state_t *state, void *user_data) {
void tap_dance_tap_hold_reset(tap_dance_state_t *state, void *user_data) {
tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)user_data;
if (tap_hold->held) {
@ -212,7 +212,7 @@ void tap_dance_tap_hold_reset(qk_tap_dance_state_t *state, void *user_data) {
#define ACTION_TAP_DANCE_TAP_HOLD(tap, hold) \
{ .fn = {NULL, tap_dance_tap_hold_finished, tap_dance_tap_hold_reset}, .user_data = (void *)&((tap_dance_tap_hold_t){tap, hold, 0}), }
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[CT_CLN] = ACTION_TAP_DANCE_TAP_HOLD(KC_COLN, KC_SCLN),
};
```
@ -256,11 +256,11 @@ enum {
SOME_OTHER_DANCE
};
td_state_t cur_dance(qk_tap_dance_state_t *state);
td_state_t cur_dance(tap_dance_state_t *state);
// For the x tap dance. Put it here so it can be used in any keymap
void x_finished(qk_tap_dance_state_t *state, void *user_data);
void x_reset(qk_tap_dance_state_t *state, void *user_data);
void x_finished(tap_dance_state_t *state, void *user_data);
void x_reset(tap_dance_state_t *state, void *user_data);
```
Now, at the bottom of your `keymap.c` file, you'll need to add the following:
@ -293,7 +293,7 @@ Now, at the bottom of your `keymap.c` file, you'll need to add the following:
* For the third point, there does exist the 'TD_DOUBLE_SINGLE_TAP', however this is not fully tested
*
*/
td_state_t cur_dance(qk_tap_dance_state_t *state) {
td_state_t cur_dance(tap_dance_state_t *state) {
if (state->count == 1) {
if (state->interrupted || !state->pressed) return TD_SINGLE_TAP;
// Key has not been interrupted, but the key is still held. Means you want to send a 'HOLD'.
@ -322,7 +322,7 @@ static td_tap_t xtap_state = {
.state = TD_NONE
};
void x_finished(qk_tap_dance_state_t *state, void *user_data) {
void x_finished(tap_dance_state_t *state, void *user_data) {
xtap_state.state = cur_dance(state);
switch (xtap_state.state) {
case TD_SINGLE_TAP: register_code(KC_X); break;
@ -337,7 +337,7 @@ void x_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void x_reset(qk_tap_dance_state_t *state, void *user_data) {
void x_reset(tap_dance_state_t *state, void *user_data) {
switch (xtap_state.state) {
case TD_SINGLE_TAP: unregister_code(KC_X); break;
case TD_SINGLE_HOLD: unregister_code(KC_LCTL); break;
@ -349,7 +349,7 @@ void x_reset(qk_tap_dance_state_t *state, void *user_data) {
xtap_state.state = TD_NONE;
}
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[X_CTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, x_finished, x_reset)
};
```
@ -385,18 +385,18 @@ static td_state_t td_state;
// Declare your tapdance functions:
// Function to determine the current tapdance state
td_state_t cur_dance(qk_tap_dance_state_t *state);
td_state_t cur_dance(tap_dance_state_t *state);
// `finished` and `reset` functions for each tapdance keycode
void altlp_finished(qk_tap_dance_state_t *state, void *user_data);
void altlp_reset(qk_tap_dance_state_t *state, void *user_data);
void altlp_finished(tap_dance_state_t *state, void *user_data);
void altlp_reset(tap_dance_state_t *state, void *user_data);
```
Below your `LAYOUT`, define each of the tapdance functions:
```c
// Determine the tapdance state to return
td_state_t cur_dance(qk_tap_dance_state_t *state) {
td_state_t cur_dance(tap_dance_state_t *state) {
if (state->count == 1) {
if (state->interrupted || !state->pressed) return TD_SINGLE_TAP;
else return TD_SINGLE_HOLD;
@ -408,7 +408,7 @@ td_state_t cur_dance(qk_tap_dance_state_t *state) {
// Handle the possible states for each tapdance keycode you define:
void altlp_finished(qk_tap_dance_state_t *state, void *user_data) {
void altlp_finished(tap_dance_state_t *state, void *user_data) {
td_state = cur_dance(state);
switch (td_state) {
case TD_SINGLE_TAP:
@ -426,7 +426,7 @@ void altlp_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void altlp_reset(qk_tap_dance_state_t *state, void *user_data) {
void altlp_reset(tap_dance_state_t *state, void *user_data) {
switch (td_state) {
case TD_SINGLE_TAP:
unregister_code16(KC_LPRN);
@ -443,7 +443,7 @@ void altlp_reset(qk_tap_dance_state_t *state, void *user_data) {
}
// Define `ACTION_TAP_DANCE_FN_ADVANCED()` for each tapdance keycode, passing in `finished` and `reset` functions
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[ALT_LP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altlp_finished, altlp_reset)
};
```
@ -478,18 +478,18 @@ enum {
// Declare the functions to be used with your tap dance key(s)
// Function associated with all tap dances
td_state_t cur_dance(qk_tap_dance_state_t *state);
td_state_t cur_dance(tap_dance_state_t *state);
// Functions associated with individual tap dances
void ql_finished(qk_tap_dance_state_t *state, void *user_data);
void ql_reset(qk_tap_dance_state_t *state, void *user_data);
void ql_finished(tap_dance_state_t *state, void *user_data);
void ql_reset(tap_dance_state_t *state, void *user_data);
```
Towards the bottom of your `keymap.c`, include the following code:
```c
// Determine the current tap dance state
td_state_t cur_dance(qk_tap_dance_state_t *state) {
td_state_t cur_dance(tap_dance_state_t *state) {
if (state->count == 1) {
if (!state->pressed) return TD_SINGLE_TAP;
else return TD_SINGLE_HOLD;
@ -504,7 +504,7 @@ static td_tap_t ql_tap_state = {
};
// Functions that control what our tap dance key does
void ql_finished(qk_tap_dance_state_t *state, void *user_data) {
void ql_finished(tap_dance_state_t *state, void *user_data) {
ql_tap_state.state = cur_dance(state);
switch (ql_tap_state.state) {
case TD_SINGLE_TAP:
@ -528,7 +528,7 @@ void ql_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void ql_reset(qk_tap_dance_state_t *state, void *user_data) {
void ql_reset(tap_dance_state_t *state, void *user_data) {
// If the key was held down and now is released then switch off the layer
if (ql_tap_state.state == TD_SINGLE_HOLD) {
layer_off(_MY_LAYER);
@ -537,7 +537,7 @@ void ql_reset(qk_tap_dance_state_t *state, void *user_data) {
}
// Associate our tap dance key with its functionality
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[QUOT_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ql_finished, ql_reset)
};

View file

@ -11,7 +11,7 @@ enum {
TD_AB = 0
};
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[TD_AB] = ACTION_TAP_DANCE_DOUBLE(KC_A, KC_B)
};

View file

@ -155,32 +155,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
/* tap dance time */
void tdexample1(qk_tap_dance_state_t *state, void *user_data) {
void tdexample1(tap_dance_state_t *state, void *user_data) {
if (state->count >= 2) {
SEND_STRING(EXAMPLESTRING1);
reset_tap_dance (state);
}
}
void tdexample2(qk_tap_dance_state_t *state, void *user_data) {
void tdexample2(tap_dance_state_t *state, void *user_data) {
if (state->count >= 2) {
SEND_STRING(EXAMPLESTRING2);
reset_tap_dance (state);
}
}
void tdexample3(qk_tap_dance_state_t *state, void *user_data) {
void tdexample3(tap_dance_state_t *state, void *user_data) {
if (state->count >= 2) {
SEND_STRING(EXAMPLESTRING3);
reset_tap_dance (state);
}
}
void tdexample4(qk_tap_dance_state_t *state, void *user_data) {
void tdexample4(tap_dance_state_t *state, void *user_data) {
if (state->count >= 2) {
SEND_STRING(EXAMPLESTRING4);
reset_tap_dance (state);
}
}
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[TD_EXAMPLE1] = ACTION_TAP_DANCE_FN(tdexample1),
[TD_EXAMPLE2] = ACTION_TAP_DANCE_FN(tdexample2),
[TD_EXAMPLE3] = ACTION_TAP_DANCE_FN(tdexample3),

View file

@ -203,7 +203,7 @@ void matrix_scan_user(void) {
}
//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_Z_LCTL] = ACTION_TAP_DANCE_DOUBLE(KC_Z, KC_LCTL),
[TD_X_LGUI] = ACTION_TAP_DANCE_DOUBLE(KC_X, KC_LGUI),

View file

@ -108,7 +108,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
void tap_dance_choose_layer (qk_tap_dance_state_t *state, void *user_data) {
void tap_dance_choose_layer (tap_dance_state_t *state, void *user_data) {
switch (state->count) {
case 1:
layer_on(_LOWER);
@ -119,7 +119,7 @@ void tap_dance_choose_layer (qk_tap_dance_state_t *state, void *user_data) {
}
}
void tap_dance_choose_layer_reset (qk_tap_dance_state_t *state, void *user_data) {
void tap_dance_choose_layer_reset (tap_dance_state_t *state, void *user_data) {
switch (state->count) {
case 1:
layer_off(_LOWER);
@ -138,7 +138,7 @@ void tap_dance_choose_layer_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[] = {
[TD_SWAP_LAYERS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_choose_layer, tap_dance_choose_layer_reset)
};

View file

@ -26,7 +26,7 @@ enum {
};
// Tap Dance definitions
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
// Tap once for F13 to F18, twice for F19 to F24
[F13F19] = ACTION_TAP_DANCE_DOUBLE(KC_F13, KC_F19), [F14F20] = ACTION_TAP_DANCE_DOUBLE(KC_F14, KC_F20), [F15F21] = ACTION_TAP_DANCE_DOUBLE(KC_F15, KC_F21),
[F16F22] = ACTION_TAP_DANCE_DOUBLE(KC_F16, KC_F22), [F17F23] = ACTION_TAP_DANCE_DOUBLE(KC_F17, KC_F23), [F18F24] = ACTION_TAP_DANCE_DOUBLE(KC_F18, KC_F24)

View file

@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[ENT_5] = ACTION_TAP_DANCE_DOUBLE(KC_5, KC_ENT),
[ZERO_7] = ACTION_TAP_DANCE_DOUBLE(KC_7, KC_0)
};

View file

@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
// Tap once for first parameter, twice for second
[_TD_CTGU] = ACTION_TAP_DANCE_DOUBLE(KC_LCTL, KC_LGUI),
[_TD_PGUP] = ACTION_TAP_DANCE_DOUBLE(KC_PGUP, LCTL(KC_PGUP)),

View file

@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
// Tap once for L-Alt, twice for L-GUI
[TD_LALT_LGUI] = ACTION_TAP_DANCE_DOUBLE(KC_LALT, KC_LGUI),
// Tap once for R-Alt, twice for R-GUI

View file

@ -84,7 +84,7 @@ enum {
};
//Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
//Tap once for semicolon, twice for ø
[SCLN_OE] = ACTION_TAP_DANCE_DOUBLE(NO_SCLN, NO_OE),
//Tap once for single quote, twice for æ

View file

@ -101,7 +101,7 @@ enum dances {
TD_DASH_USCR,
};
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
// Tap once for Shift, twice for Caps Lock
[TD_SHFT_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS),
[TD_COM_SCL] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, SE_SCLN),

View file

@ -45,7 +45,7 @@ enum tapdances{
TD_ESQW,
};
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[TD_ESFL] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _FLOCK),
[TD_ESQW] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _QWERTY),
};

View file

@ -38,7 +38,7 @@ enum tapdances{
TD_ESQW,
};
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[TD_ESFL] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _FLOCK),
[TD_ESQW] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _QWERTY),
};

View file

@ -112,7 +112,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______,_______,_______, _______, _______,_______,_______,_______, _______,_______,_______),
};
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
/* Tap once: nothing. Tap twice: Alt+F4 */
[AF4] = ACTION_TAP_DANCE_DOUBLE(XXXXXXX,A(F4)),
};

View file

@ -22,7 +22,7 @@ enum {
TD_SPACE_CADET_ENTER = 1
};
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[TD_SPACE_CADET_SHIFT] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_LPRN),
[TD_SPACE_CADET_ENTER] = ACTION_TAP_DANCE_DOUBLE(KC_ENT, KC_RPRN)
};

View file

@ -141,7 +141,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// Parantheses
void paranthesis_dance (qk_tap_dance_state_t *state, void *user_data) {
void paranthesis_dance (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
SEND_STRING("()"); register_code(KC_LEFT); unregister_code(KC_LEFT);
} else if (state->count == 2) {
@ -151,7 +151,7 @@ void paranthesis_dance (qk_tap_dance_state_t *state, void *user_data) {
}
}
void curly_dance (qk_tap_dance_state_t *state, void *user_data) {
void curly_dance (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
SEND_STRING("{}"); register_code(KC_LEFT); unregister_code(KC_LEFT);
} else if (state->count == 2) {
@ -161,7 +161,7 @@ void curly_dance (qk_tap_dance_state_t *state, void *user_data) {
}
}
void square_dance (qk_tap_dance_state_t *state, void *user_data) {
void square_dance (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
SEND_STRING("[]"); register_code(KC_LEFT); unregister_code(KC_LEFT);
} else if (state->count == 2) {
@ -171,7 +171,7 @@ void square_dance (qk_tap_dance_state_t *state, void *user_data) {
}
}
void angular_dance (qk_tap_dance_state_t *state, void *user_data) {
void angular_dance (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
SEND_STRING("<>"); register_code(KC_LEFT); unregister_code(KC_LEFT);
} else if (state->count == 2) {
@ -181,7 +181,7 @@ void angular_dance (qk_tap_dance_state_t *state, void *user_data) {
}
}
void tmux_dance (qk_tap_dance_state_t *state, void *user_data) {
void tmux_dance (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
SEND_STRING("tmux"); register_code(KC_ENT); unregister_code(KC_ENT);
} else if (state->count == 2) {
@ -194,7 +194,7 @@ void tmux_dance (qk_tap_dance_state_t *state, void *user_data) {
}
}
void cmd_dance (qk_tap_dance_state_t *state, void *user_data) {
void cmd_dance (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
register_mods(MOD_BIT(KC_LCTL));
register_mods(MOD_BIT(KC_LALT));
@ -219,7 +219,7 @@ void cmd_dance (qk_tap_dance_state_t *state, void *user_data) {
}
}
void cmd_sft_slash_pipe_down (qk_tap_dance_state_t *state, void *user_data) {
void cmd_sft_slash_pipe_down (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
if (state->interrupted || state->pressed==0) {
register_code (KC_NONUS_BACKSLASH);
@ -232,7 +232,7 @@ void cmd_sft_slash_pipe_down (qk_tap_dance_state_t *state, void *user_data) {
}
}
void cmd_sft_slash_pipe_up (qk_tap_dance_state_t *state, void *user_data) {
void cmd_sft_slash_pipe_up (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
if (keyboard_report->mods & MOD_BIT(KC_LSFT)) {
unregister_code (KC_LSFT);
@ -246,7 +246,7 @@ void cmd_sft_slash_pipe_up (qk_tap_dance_state_t *state, void *user_data) {
}
//All tap dance functions would go here. Only showing this one.
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[CLN] = ACTION_TAP_DANCE_DOUBLE (KC_SCLN, S(KC_SCLN ))
,[QUOT] = ACTION_TAP_DANCE_DOUBLE (KC_QUOT, S(KC_2))
,[CAD_CAE] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, NULL, cmd_dance )

View file

@ -31,7 +31,7 @@ static int espc_r_tap_state = 0;
static int scln_cln_tap_state = 0;
// Watch the state of the tap dance
int cur_dance(qk_tap_dance_state_t *state) {
int cur_dance(tap_dance_state_t *state) {
if (state->pressed) {
return SINGLE_HOLD;
}
@ -49,7 +49,7 @@ int cur_dance(qk_tap_dance_state_t *state) {
}
// Extended Space Cadet Shift - Left ==================================
void espc_l_finished(qk_tap_dance_state_t *state, void *user_data) {
void espc_l_finished(tap_dance_state_t *state, void *user_data) {
espc_l_tap_state = cur_dance(state);
switch (espc_l_tap_state) {
case SINGLE_TAP: // (
@ -69,7 +69,7 @@ void espc_l_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void espc_l_reset(qk_tap_dance_state_t *state, void *user_data) {
void espc_l_reset(tap_dance_state_t *state, void *user_data) {
switch (espc_l_tap_state) {
case SINGLE_TAP: // (
unregister_code16(LSFT(KC_9));
@ -89,7 +89,7 @@ void espc_l_reset(qk_tap_dance_state_t *state, void *user_data) {
// ====================================================================//
// Extended Space Cadet Shift - Right ==================================
void espc_r_finished(qk_tap_dance_state_t *state, void *user_data) {
void espc_r_finished(tap_dance_state_t *state, void *user_data) {
espc_r_tap_state = cur_dance(state);
switch (espc_r_tap_state) {
case SINGLE_TAP: // )
@ -109,7 +109,7 @@ void espc_r_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void espc_r_reset(qk_tap_dance_state_t *state, void *user_data) {
void espc_r_reset(tap_dance_state_t *state, void *user_data) {
switch (espc_r_tap_state) {
case SINGLE_TAP: // )
unregister_code16(LSFT(KC_0));
@ -129,7 +129,7 @@ void espc_r_reset(qk_tap_dance_state_t *state, void *user_data) {
// ====================================================================//
// Semicolon - Colon ==================================================
void scln_cln_finished(qk_tap_dance_state_t *state, void *user_data) {
void scln_cln_finished(tap_dance_state_t *state, void *user_data) {
scln_cln_tap_state = cur_dance(state);
switch (scln_cln_tap_state) {
case SINGLE_TAP: // ;
@ -141,7 +141,7 @@ void scln_cln_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void scln_cln_reset(qk_tap_dance_state_t *state, void *user_data) {
void scln_cln_reset(tap_dance_state_t *state, void *user_data) {
switch (scln_cln_tap_state) {
case SINGLE_TAP: // ;
unregister_code16(KC_SCLN);
@ -154,7 +154,7 @@ void scln_cln_reset(qk_tap_dance_state_t *state, void *user_data) {
// ====================================================================//
// Associate tap dance with defined functionality
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
// Extended space cadet shift left: Hold - Shift, One - (, Two - {, Three - [
[ESPC_L] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, espc_l_finished, espc_l_reset),
// Extended space cadet shift right: Hold - Shift, One - ), Two - }, Three - ]

View file

@ -2,6 +2,6 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "tap_dances.h"
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[TD_LSFT_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS)
};

View file

@ -375,7 +375,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void dance_left_finished (qk_tap_dance_state_t *state, void *user_data) {
void dance_left_finished (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) { //1 tap, move to line left
keymap_config.raw = eeconfig_read_keymap();
if(keymap_config.swap_lctl_lgui){ //Linux
@ -388,7 +388,7 @@ void dance_left_finished (qk_tap_dance_state_t *state, void *user_data) {
}
}
void dance_right_finished (qk_tap_dance_state_t *state, void *user_data) {
void dance_right_finished (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) { // 1 tap, move line right
keymap_config.raw = eeconfig_read_keymap();
if(keymap_config.swap_lctl_lgui){ //Linux
@ -402,7 +402,7 @@ void dance_right_finished (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[] = {
[TD_MOVE_BEGIN_LINE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_left_finished, NULL),
[TD_MOVE_END_LINE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_right_finished, NULL),
[TD_PERIOD_COMMA] = ACTION_TAP_DANCE_DOUBLE(KC_DOT, KC_COMMA),

View file

@ -4,7 +4,7 @@
#include QMK_KEYBOARD_H
#include "tap_dances.h"
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS),
[TD_TAB_CTRLTAB] = ACTION_TAP_DANCE_DOUBLE(KC_TAB, LCTL(KC_TAB)),
[TD_GRV_CTRLGRV] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, LGUI(KC_GRV)),

Some files were not shown because too many files have changed in this diff Show more