1
0
Fork 0

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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
298 changed files with 1327 additions and 1327 deletions

View file

@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Tap dances definitions
// Need to needs to be defined in a .c file to avoid a linker error (multiple definitions)
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[TD_LSPO_CAPS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, LSPO_CAPS_finished, LSPO_CAPS_reset),
[TD_RSPC_CAPS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, RSPC_CAPS_finished, RSPC_CAPS_reset),
[TD_ESC_DEL] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_DEL),
@ -34,7 +34,7 @@ qk_tap_dance_action_t tap_dance_actions[] = {
// + ------ +
// https://github.com/qmk/qmk_firmware/blob/9294258c02d3e025e01935a06c4d9f1997535bda/users/gordon/gordon.c#L112-L135
td_state_t hold_cur_dance(qk_tap_dance_state_t *state) {
td_state_t hold_cur_dance(tap_dance_state_t *state) {
if (state->count == 1) {
if (state->interrupted) {
if (!state->pressed)
@ -63,7 +63,7 @@ td_state_t hold_cur_dance(qk_tap_dance_state_t *state) {
// Create an instance of 'td_tap_t' for the 'LSPO_CAPS' tap dance.
static td_tap_t LSPO_CAPS_state = {.is_press_action = true, .state = TD_NONE};
void LSPO_CAPS_finished(qk_tap_dance_state_t *state, void *user_data) {
void LSPO_CAPS_finished(tap_dance_state_t *state, void *user_data) {
LSPO_CAPS_state.state = hold_cur_dance(state);
switch (LSPO_CAPS_state.state) {
case TD_SINGLE_TAP:
@ -80,7 +80,7 @@ void LSPO_CAPS_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void LSPO_CAPS_reset(qk_tap_dance_state_t *state, void *user_data) {
void LSPO_CAPS_reset(tap_dance_state_t *state, void *user_data) {
switch (LSPO_CAPS_state.state) {
case TD_SINGLE_TAP:
unregister_code16(KC_LPRN);
@ -104,7 +104,7 @@ void LSPO_CAPS_reset(qk_tap_dance_state_t *state, void *user_data) {
// Create an instance of 'td_tap_t' for the 'RSPC_CAPS' tap dance.
static td_tap_t RSPC_CAPS_state = {.is_press_action = true, .state = TD_NONE};
void RSPC_CAPS_finished(qk_tap_dance_state_t *state, void *user_data) {
void RSPC_CAPS_finished(tap_dance_state_t *state, void *user_data) {
RSPC_CAPS_state.state = hold_cur_dance(state);
switch (RSPC_CAPS_state.state) {
case TD_SINGLE_TAP:
@ -121,7 +121,7 @@ void RSPC_CAPS_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void RSPC_CAPS_reset(qk_tap_dance_state_t *state, void *user_data) {
void RSPC_CAPS_reset(tap_dance_state_t *state, void *user_data) {
switch (RSPC_CAPS_state.state) {
case TD_SINGLE_TAP:
unregister_code16(KC_RPRN);

View file

@ -60,12 +60,12 @@ typedef struct {
// + --------- +
// Tap dance for fast modifiers; favors being held over being tapped.
td_state_t hold_cur_dance(qk_tap_dance_state_t *state);
td_state_t hold_cur_dance(tap_dance_state_t *state);
// Left Shift Parenthesis Open (LSPO) and Caps Lock (CAPS) on DOUBLE_TAP
void LSPO_CAPS_finished(qk_tap_dance_state_t *state, void *user_data);
void LSPO_CAPS_reset(qk_tap_dance_state_t *state, void *user_data);
void LSPO_CAPS_finished(tap_dance_state_t *state, void *user_data);
void LSPO_CAPS_reset(tap_dance_state_t *state, void *user_data);
// Right Shift Parenthesis Close (RSPC) and Caps Lock (CAPS) on DOUBLE_TAP
void RSPC_CAPS_finished(qk_tap_dance_state_t *state, void *user_data);
void RSPC_CAPS_reset(qk_tap_dance_state_t *state, void *user_data);
void RSPC_CAPS_finished(tap_dance_state_t *state, void *user_data);
void RSPC_CAPS_reset(tap_dance_state_t *state, void *user_data);