summaryrefslogtreecommitdiff
path: root/users/brandonschlack
diff options
context:
space:
mode:
Diffstat (limited to 'users/brandonschlack')
-rw-r--r--users/brandonschlack/tap_dances.c22
-rw-r--r--users/brandonschlack/tap_dances.h10
2 files changed, 16 insertions, 16 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);
diff --git a/users/brandonschlack/tap_dances.h b/users/brandonschlack/tap_dances.h
index 3747619a5e..62c585631e 100644
--- a/users/brandonschlack/tap_dances.h
+++ b/users/brandonschlack/tap_dances.h
@@ -29,7 +29,7 @@ enum tap_dance_states {
TRIPLE_HOLD = 7
};
-int cur_dance (qk_tap_dance_state_t *state);
+int cur_dance (tap_dance_state_t *state);
void process_tap_dance_keycode (bool reset, uint8_t toggle_layer);
/* Tap Dance: Trigger Layer
@@ -41,12 +41,12 @@ typedef struct {
uint8_t trigger;
uint8_t layer;
uint8_t state;
-} qk_tap_dance_trigger_layer_t;
+} tap_dance_trigger_layer_t;
#define ACTION_TAP_DANCE_TRIGGER_LAYER(trigger, layer) { \
.fn = { NULL, td_trigger_layer_finished, td_trigger_layer_reset }, \
- .user_data = (void *)&((qk_tap_dance_trigger_layer_t) { trigger, layer, 0 }), \
+ .user_data = (void *)&((tap_dance_trigger_layer_t) { trigger, layer, 0 }), \
}
-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);
+void td_trigger_layer_finished (tap_dance_state_t *state, void *user_data);
+void td_trigger_layer_reset (tap_dance_state_t *state, void *user_data);