summaryrefslogtreecommitdiffstats
path: root/users/brandonschlack/tap_dances.c
diff options
context:
space:
mode:
authorlokher <lokher@gmail.com>2023-04-26 16:32:15 +0800
committerlokher <lokher@gmail.com>2023-04-26 16:32:15 +0800
commite4f4ceaf3f2e3d25fb282273a81f9b58790fc427 (patch)
treec0a257eab0ffe5238fdf2c04882e8ee1fe8fc46e /users/brandonschlack/tap_dances.c
parent103badc87cb50db1ff3851c84331e86ba78fb681 (diff)
merge upstream 713427c
Diffstat (limited to 'users/brandonschlack/tap_dances.c')
-rw-r--r--users/brandonschlack/tap_dances.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/users/brandonschlack/tap_dances.c b/users/brandonschlack/tap_dances.c
index 861b31805b..4a4a530ff2 100644
--- a/users/brandonschlack/tap_dances.c
+++ b/users/brandonschlack/tap_dances.c
@@ -16,7 +16,7 @@
#include "tap_dances.h"
#include "process_keycode/process_tap_dance.h"
-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_TAP;
else return SINGLE_HOLD;
@@ -35,8 +35,8 @@ int cur_dance (qk_tap_dance_state_t *state) {
__attribute__ ((weak))
void process_tap_dance_keycode (bool reset, uint8_t toggle_layer) { };
-void td_trigger_layer_finished (qk_tap_dance_state_t *state, void *user_data) {
- qk_tap_dance_trigger_layer_t *data = (qk_tap_dance_trigger_layer_t *)user_data;
+void td_trigger_layer_finished (tap_dance_state_t *state, void *user_data) {
+ tap_dance_trigger_layer_t *data = (tap_dance_trigger_layer_t *)user_data;
data->state = cur_dance(state);
if (data->state == data->trigger) {
@@ -46,8 +46,8 @@ void td_trigger_layer_finished (qk_tap_dance_state_t *state, void *user_data) {
}
}
-void td_trigger_layer_reset (qk_tap_dance_state_t *state, void *user_data) {
- qk_tap_dance_trigger_layer_t *data = (qk_tap_dance_trigger_layer_t *)user_data;
+void td_trigger_layer_reset (tap_dance_state_t *state, void *user_data) {
+ tap_dance_trigger_layer_t *data = (tap_dance_trigger_layer_t *)user_data;
if (data->state == data->trigger) {
switch (data->trigger) {
case SINGLE_HOLD:
@@ -63,8 +63,8 @@ void td_trigger_layer_reset (qk_tap_dance_state_t *state, void *user_data) {
}
/* Tap Dance: Layer Mod. Toggles Layer when tapped, Mod when held. */
-void td_layer_mod_each(qk_tap_dance_state_t *state, void *user_data) {
- qk_tap_dance_dual_role_t *data = (qk_tap_dance_dual_role_t *)user_data;
+void td_layer_mod_each(tap_dance_state_t *state, void *user_data) {
+ tap_dance_dual_role_t *data = (tap_dance_dual_role_t *)user_data;
// Single tap → toggle layer, Single hold → mod
if (state->pressed) {
@@ -74,16 +74,16 @@ void td_layer_mod_each(qk_tap_dance_state_t *state, void *user_data) {
}
}
-void td_layer_mod_finished(qk_tap_dance_state_t *state, void *user_data) {
- qk_tap_dance_dual_role_t *data = (qk_tap_dance_dual_role_t *)user_data;
+void td_layer_mod_finished(tap_dance_state_t *state, void *user_data) {
+ tap_dance_dual_role_t *data = (tap_dance_dual_role_t *)user_data;
if (state->count == 1 && !state->pressed) {
layer_invert(data->layer);
}
}
-void td_layer_mod_reset(qk_tap_dance_state_t *state, void *user_data) {
- qk_tap_dance_dual_role_t *data = (qk_tap_dance_dual_role_t *)user_data;
+void td_layer_mod_reset(tap_dance_state_t *state, void *user_data) {
+ tap_dance_dual_role_t *data = (tap_dance_dual_role_t *)user_data;
if (state->count == 1) {
unregister_code(data->kc);