summaryrefslogtreecommitdiff
path: root/tests/tap_dance
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tap_dance')
-rw-r--r--tests/tap_dance/examples.c22
-rw-r--r--tests/tap_dance/tap_dance_layers/tap_dance_defs.c8
2 files changed, 15 insertions, 15 deletions
diff --git a/tests/tap_dance/examples.c b/tests/tap_dance/examples.c
index 4a5be41b08..af74388209 100644
--- a/tests/tap_dance/examples.c
+++ b/tests/tap_dance/examples.c
@@ -23,7 +23,7 @@
// Example 1
-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!");
tap_code(KC_C);
@@ -34,7 +34,7 @@ void dance_egg(qk_tap_dance_state_t *state, void *user_data) {
// Example 2
-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:
register_code(KC_3);
@@ -54,14 +54,14 @@ void dance_flsh_each(qk_tap_dance_state_t *state, void *user_data) {
}
}
-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();
tap_code(KC_R);
}
}
-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) {
unregister_code(KC_1);
// wait_ms(50);
unregister_code(KC_2);
@@ -79,7 +79,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):
@@ -92,7 +92,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) {
@@ -110,7 +110,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) {
@@ -142,7 +142,7 @@ typedef struct {
td_state_t state;
} td_tap_t;
-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;
@@ -163,7 +163,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;
@@ -175,7 +175,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;
@@ -188,7 +188,7 @@ void x_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_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),
diff --git a/tests/tap_dance/tap_dance_layers/tap_dance_defs.c b/tests/tap_dance/tap_dance_layers/tap_dance_defs.c
index 5ec900c041..fbe37f7ed0 100644
--- a/tests/tap_dance/tap_dance_layers/tap_dance_defs.c
+++ b/tests/tap_dance/tap_dance_layers/tap_dance_defs.c
@@ -43,7 +43,7 @@ enum lt_app_state {
static enum lt_app_state saved_lt_app_state;
-static enum lt_app_state get_lt_app_state(qk_tap_dance_state_t *state) {
+static enum lt_app_state get_lt_app_state(tap_dance_state_t *state) {
if (state->count == 1) {
if (!state->pressed) {
return LTA_SINGLE_TAP;
@@ -57,7 +57,7 @@ static enum lt_app_state get_lt_app_state(qk_tap_dance_state_t *state) {
}
}
-static void lt_app_finished(qk_tap_dance_state_t *state, void *user_data) {
+static void lt_app_finished(tap_dance_state_t *state, void *user_data) {
saved_lt_app_state = get_lt_app_state(state);
switch (saved_lt_app_state) {
case LTA_NONE:
@@ -74,7 +74,7 @@ static void lt_app_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
-static void lt_app_reset(qk_tap_dance_state_t *state, void *user_data) {
+static void lt_app_reset(tap_dance_state_t *state, void *user_data) {
switch (saved_lt_app_state) {
case LTA_NONE:
break;
@@ -90,7 +90,7 @@ static void lt_app_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_L_MOVE] = ACTION_TAP_DANCE_LAYER_MOVE(KC_APP, 1),
[TD_L_TOGG] = ACTION_TAP_DANCE_LAYER_TOGGLE(KC_APP, 1),
[TD_LT_APP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lt_app_finished, lt_app_reset),