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

@ -31,7 +31,7 @@ typedef enum {
static tap_dance_state_enum tap_dance_state;
static bool tap_dance_active = false;
void tap_dance_sym_vim_finished(qk_tap_dance_state_t *state, void *user_data) {
void tap_dance_sym_vim_finished(tap_dance_state_t *state, void *user_data) {
// Determine the current state
if (state->count == 1) {
if (state->interrupted || state->pressed == 0) tap_dance_state = SINGLE_TAP;
@ -60,7 +60,7 @@ void tap_dance_sym_vim_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void tap_dance_sym_vim_reset(qk_tap_dance_state_t *state, void *user_data) {
void tap_dance_sym_vim_reset(tap_dance_state_t *state, void *user_data) {
switch(tap_dance_state) {
case SINGLE_TAP:
clear_oneshot_layer_state(ONESHOT_PRESSED);
@ -74,7 +74,7 @@ void tap_dance_sym_vim_reset(qk_tap_dance_state_t *state, void *user_data) {
}
}
void tap_dance_copy_paste_finished(qk_tap_dance_state_t *state, void *user_data) {
void tap_dance_copy_paste_finished(tap_dance_state_t *state, void *user_data) {
bool is_paste = state->count == 2;
// If either the one-shot shift is set, or if shift is being held, count as shift being held.
// We'll clear the one-shot shift if it was held
@ -103,7 +103,7 @@ void tap_dance_copy_paste_finished(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_SYM_VIM] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_sym_vim_finished, tap_dance_sym_vim_reset),
[TD_COPY_PASTE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_copy_paste_finished, NULL)
};

View file

@ -45,7 +45,7 @@ enum custom_keys {
PSCREEN_APP
};
void tap_dance_sym_vim_finished(qk_tap_dance_state_t*, void*);
void tap_dance_sym_vim_reset(qk_tap_dance_state_t*, void*);
void tap_dance_sym_vim_finished(tap_dance_state_t*, void*);
void tap_dance_sym_vim_reset(tap_dance_state_t*, void*);
void tap_dance_process_keycode(uint16_t);
bool try_handle_macro(uint16_t keycode, keyrecord_t *record);

View file

@ -2,11 +2,11 @@
#define ACTION_TAP_DANCE_DOUBLE_MODS(mod1, mod2) { \
.fn = { td_double_mods_each, NULL, td_double_mods_reset }, \
.user_data = &(qk_tap_dance_pair_t){ mod1, mod2 }, \
.user_data = &(tap_dance_pair_t){ mod1, mod2 }, \
}
void td_double_mods_each(qk_tap_dance_state_t *state, void *user_data) {
qk_tap_dance_pair_t *mods = (qk_tap_dance_pair_t *)user_data;
void td_double_mods_each(tap_dance_state_t *state, void *user_data) {
tap_dance_pair_t *mods = (tap_dance_pair_t *)user_data;
// Single tap → mod1, double tap → mod2, triple tap etc. → mod1+mod2
if (state->count == 1 || state->count == 3) {
register_code(mods->kc1);
@ -18,8 +18,8 @@ void td_double_mods_each(qk_tap_dance_state_t *state, void *user_data) {
state->weak_mods &= ~(MOD_BIT(mods->kc1) | MOD_BIT(mods->kc2));
}
void td_double_mods_reset(qk_tap_dance_state_t *state, void *user_data) {
qk_tap_dance_pair_t *mods = (qk_tap_dance_pair_t *)user_data;
void td_double_mods_reset(tap_dance_state_t *state, void *user_data) {
tap_dance_pair_t *mods = (tap_dance_pair_t *)user_data;
if (state->count == 1 || state->count >= 3) {
unregister_code(mods->kc1);
}
@ -28,6 +28,6 @@ void td_double_mods_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_RSF_RCT] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RSFT, KC_RCTL),
};

View file

@ -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);

View file

@ -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);

View file

@ -1,4 +1,4 @@
#include "tap_dances.h"
#include "curry.h"
qk_tap_dance_action_t tap_dance_actions[] = {};
tap_dance_action_t tap_dance_actions[] = {};

View file

@ -1,6 +1,6 @@
#include "tap-dance.h"
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
/* Tap once/hold for Shift, tap twice for Caps Lock */
[SHIFT_CAPS] = ACTION_TAP_DANCE_DOUBLE( KC_LSFT, KC_CAPS )
};

View file

@ -1,7 +1,7 @@
#include "tap_dance.h"
//**************** Definitions needed for quad function to work *********************//
#ifdef QUAD_DANCE
int cur_dance(qk_tap_dance_state_t *state)
int cur_dance(tap_dance_state_t *state)
{
if (state->count == 1)
{
@ -30,8 +30,8 @@ int cur_dance(qk_tap_dance_state_t *state)
# endif
// Slightly better tap dance double: interruption sends double single and any number over double sends the single that number of times
void qk_tap_dance_pair_finished_safe(qk_tap_dance_state_t *state, void *user_data) {
qk_tap_dance_pair_t *pair = (qk_tap_dance_pair_t *)user_data;
void tap_dance_pair_finished_safe(tap_dance_state_t *state, void *user_data) {
tap_dance_pair_t *pair = (tap_dance_pair_t *)user_data;
int count = state->count;
if (state->count == 2) {
if (state->interrupted){
@ -47,8 +47,8 @@ void qk_tap_dance_pair_finished_safe(qk_tap_dance_state_t *state, void *user_dat
}
}
void qk_tap_dance_pair_reset_safe(qk_tap_dance_state_t *state, void *user_data) {
qk_tap_dance_pair_t *pair = (qk_tap_dance_pair_t *)user_data;
void tap_dance_pair_reset_safe(tap_dance_state_t *state, void *user_data) {
tap_dance_pair_t *pair = (tap_dance_pair_t *)user_data;
if (state->count == 2) {
unregister_code16 (pair->kc2);
return;
@ -58,7 +58,7 @@ void qk_tap_dance_pair_reset_safe(qk_tap_dance_state_t *state, void *user_data)
//**************** Tap dance functions *********************//
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[COPY_CUT] = ACTION_TAP_DANCE_FN(td_copy_cut),
[PASTE_DANCE] = ACTION_TAP_DANCE_FN(td_paste),
[_TD_F1] = ACTION_TAP_DANCE_DOUBLE(KC_1, KC_F1),
@ -86,7 +86,7 @@ qk_tap_dance_action_t tap_dance_actions[] = {
[_TD_PASTE] = ACTION_TAP_DANCE_FN(dance_paste)
};
void td_copy_cut(qk_tap_dance_state_t *state, void *user_data)
void td_copy_cut(tap_dance_state_t *state, void *user_data)
{
if (state->count == 2)
{
@ -99,7 +99,7 @@ void td_copy_cut(qk_tap_dance_state_t *state, void *user_data)
reset_tap_dance(state);
};
void td_paste(qk_tap_dance_state_t *state, void *user_data)
void td_paste(tap_dance_state_t *state, void *user_data)
{
if (state->count == 2)
{
@ -113,7 +113,7 @@ void td_paste(qk_tap_dance_state_t *state, void *user_data)
};
//===== The awesome tap dance for CUT, COPY and PASTE letters
void dance_copy (qk_tap_dance_state_t *state, void *user_data) {
void dance_copy (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) { tap_code16(KC_C); }
else
if (state->interrupted) { tap_code16(KC_C);tap_code16(KC_C);}
@ -122,13 +122,13 @@ void dance_copy (qk_tap_dance_state_t *state, void *user_data) {
reset_tap_dance (state);
}
void dance_cut (qk_tap_dance_state_t *state, void *user_data) {
void dance_cut (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) { tap_code16(KC_X); }
else { CMD(KC_X); }
reset_tap_dance (state);
}
void dance_paste (qk_tap_dance_state_t *state, void *user_data) {
void dance_paste (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
tap_code16(KC_V);
}

View file

@ -4,8 +4,8 @@ extern bool onMac;
#define ACTION_TAP_DANCE_DOUBLE_SAFE(kc1, kc2) { \
.fn = { NULL, qk_tap_dance_pair_finished_safe, qk_tap_dance_pair_reset_safe }, \
.user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }), \
.fn = { NULL, tap_dance_pair_finished_safe, tap_dance_pair_reset_safe }, \
.user_data = (void *)&((tap_dance_pair_t) { kc1, kc2 }), \
}
#ifdef QUAD_DANCE
@ -18,7 +18,7 @@ enum {
DOUBLE_SINGLE_TAP = 5 //send SINGLE_TAP twice - NOT DOUBLE_TAP
// Add more enums here if you want for triple, quadruple, etc.
};
int cur_dance (qk_tap_dance_state_t *state);
int cur_dance (tap_dance_state_t *state);
# endif
enum tap_dance {
@ -48,14 +48,14 @@ enum tap_dance {
_TD_CUT,
_TD_PASTE,
};
void qk_tap_dance_pair_finished_safe(qk_tap_dance_state_t *state, void *user_data);
void qk_tap_dance_pair_reset_safe(qk_tap_dance_state_t *state, void *user_data);
void td_copy_cut (qk_tap_dance_state_t *state, void *user_data);
void td_paste(qk_tap_dance_state_t *state, void *user_data);
int cur_dance (qk_tap_dance_state_t *state);
void dance_cut (qk_tap_dance_state_t *state, void *user_data);
void dance_copy (qk_tap_dance_state_t *state, void *user_data);
void dance_paste (qk_tap_dance_state_t *state, void *user_data);
void tap_dance_pair_finished_safe(tap_dance_state_t *state, void *user_data);
void tap_dance_pair_reset_safe(tap_dance_state_t *state, void *user_data);
void td_copy_cut (tap_dance_state_t *state, void *user_data);
void td_paste(tap_dance_state_t *state, void *user_data);
int cur_dance (tap_dance_state_t *state);
void dance_cut (tap_dance_state_t *state, void *user_data);
void dance_copy (tap_dance_state_t *state, void *user_data);
void dance_paste (tap_dance_state_t *state, void *user_data);
// Ready to use Tap dance definitions, just put them on your layout
#define TD_COPY TD(_TD_COPY)

View file

@ -54,6 +54,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[TD_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS) // shift/caps TD
};

View file

@ -30,7 +30,7 @@ These are the custom defined dances that I'm using. It sets up everything for l
```c
//Tap Dance Definitions, sets the index and the keycode.
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
// tap once to disable, and more to enable timed micros
[TD_D3_1] = ACTION_TAP_DANCE_DIABLO(0, KC_1),
[TD_D3_2] = ACTION_TAP_DANCE_DIABLO(1, KC_2),
@ -82,7 +82,7 @@ The first part of the magic here is the `diablo_tapdance_master` function. The
```c
// Cycle through the times for the macro, starting at 0, for disabled.
void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data) {
void diablo_tapdance_master(tap_dance_state_t *state, void *user_data) {
diable_keys_t *diablo_keys = (diable_keys_t *)user_data;
// Sets the keycode based on the index
diablo_timer[diablo_keys->index].keycode = diablo_keys->keycode;

View file

@ -17,7 +17,7 @@ uint8_t diablo_times[] = {0, 1, 3, 5, 10, 30};
* @param state Main data struction contining information about events
* @param user_data Local data for the dance. Allows customization to be passed on to function
*/
void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data) {
void diablo_tapdance_master(tap_dance_state_t *state, void *user_data) {
diable_keys_t *diablo_keys = (diable_keys_t *)user_data;
// Sets the keycode based on the index
diablo_timer[diablo_keys->index].keycode = diablo_keys->keycode;
@ -40,7 +40,7 @@ void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data) {
// clang-format on
// Tap Dance Definitions, sets the index and the keycode.
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
// tap once to disable, and more to enable timed micros
[TD_D3_1] = ACTION_TAP_DANCE_DIABLO(0, KC_1),
[TD_D3_2] = ACTION_TAP_DANCE_DIABLO(1, KC_2),

View file

@ -5,7 +5,7 @@
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// tap dance processing
qk_tap_dance_action_t *action;
tap_dance_action_t *action;
switch (keycode) {
case TD(TD_DEL_WORD_DEL): // list all tap dance keycodes with tap-hold configurations
action = &tap_dance_actions[TD_INDEX(keycode)];
@ -167,7 +167,7 @@ bool caps_word_press_user(uint16_t keycode) {
}
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) {
@ -185,7 +185,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) {
@ -196,7 +196,7 @@ void tap_dance_tap_hold_reset(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[] = {
// Tap once for Escape, twice for Caps Lock
// [TD_BSPC_CTL_BSPC] = ACTION_TAP_DANCE_DOUBLE(KC_BSPC, RCTL(KC_BSPC)),
// [TD_BSPC_CTL_BSPC_IOS] = ACTION_TAP_DANCE_DOUBLE(KC_BSPC, LALT(KC_BSPC)),

View file

@ -14,7 +14,7 @@ typedef struct {
} td_status_t;
static td_status_t td_status = {NONE, NONE};
uint8_t cur_dance(qk_tap_dance_state_t *state) {
uint8_t cur_dance(tap_dance_state_t *state) {
if (state->interrupted || !state->pressed) {
return state->count == 1 ? SINGLE_TAP : DOUBLE_TAP;
} else {
@ -22,7 +22,7 @@ uint8_t cur_dance(qk_tap_dance_state_t *state) {
}
}
void td_lower_finished(qk_tap_dance_state_t *state, void *user_data) {
void td_lower_finished(tap_dance_state_t *state, void *user_data) {
td_status.lower = cur_dance(state);
switch (td_status.lower) {
case SINGLE_TAP:
@ -36,7 +36,7 @@ void td_lower_finished(qk_tap_dance_state_t *state, void *user_data) {
layer_on(L_EDVORAKJP_LOWER);
}
void td_lower_reset(qk_tap_dance_state_t *state, void *user_data) {
void td_lower_reset(tap_dance_state_t *state, void *user_data) {
switch (td_status.lower) {
case DOUBLE_TAP:
unregister_code(KC_ESC);
@ -46,7 +46,7 @@ void td_lower_reset(qk_tap_dance_state_t *state, void *user_data) {
td_status.lower = NONE;
}
void td_raise_finished(qk_tap_dance_state_t *state, void *user_data) {
void td_raise_finished(tap_dance_state_t *state, void *user_data) {
td_status.raise = cur_dance(state);
switch (td_status.raise) {
case DOUBLE_TAP:
@ -58,12 +58,12 @@ void td_raise_finished(qk_tap_dance_state_t *state, void *user_data) {
layer_on(L_EDVORAKJP_RAISE);
}
void td_raise_reset(qk_tap_dance_state_t *state, void *user_data) {
void td_raise_reset(tap_dance_state_t *state, void *user_data) {
layer_off(L_EDVORAKJP_RAISE);
td_status.raise = NONE;
}
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[TD_EDVORAKJP_LOWER] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, td_lower_finished, td_lower_reset),
[TD_EDVORAKJP_RAISE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, td_raise_finished, td_raise_reset),
};

View file

@ -515,9 +515,9 @@ enum {
int on_qwerty(void);
#ifdef TAP_DANCES_ENABLE
int cur_dance (qk_tap_dance_state_t *state);
int 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);
#endif

View file

@ -22,7 +22,7 @@
#include "action_layer.h"
#include "process_keycode/process_tap_dance.h"
void tap_dance_mouse_btns (qk_tap_dance_state_t *state, void *user_data) {
void tap_dance_mouse_btns (tap_dance_state_t *state, void *user_data) {
switch(state->count){
case 1:
register_code(KC_BTN1);
@ -72,7 +72,7 @@ static void switch_default_layer(uint8_t layer) {
}
*/
void tap_dance_df_bepo_layers_switch (qk_tap_dance_state_t *state, void *user_data) {
void tap_dance_df_bepo_layers_switch (tap_dance_state_t *state, void *user_data) {
switch(state->count){
case 1:
switch_default_layer(_DVORAK_BP);
@ -89,7 +89,7 @@ void tap_dance_df_bepo_layers_switch (qk_tap_dance_state_t *state, void *user_da
reset_tap_dance(state);
}
void tap_dance_layer_switch (qk_tap_dance_state_t *state, void *user_data) {
void tap_dance_layer_switch (tap_dance_state_t *state, void *user_data) {
switch(state->count){
case 1:
if(on_qwerty())
@ -115,7 +115,7 @@ void tap_dance_layer_switch (qk_tap_dance_state_t *state, void *user_data) {
reset_tap_dance(state);
}
void tap_dance_default_layer_switch (qk_tap_dance_state_t *state, void *user_data) {
void tap_dance_default_layer_switch (tap_dance_state_t *state, void *user_data) {
switch(state->count){
case 1:
switch_default_layer(_DVORAK);
@ -178,7 +178,7 @@ void switch_default_layer_on_bepo(int count) {
// a qwerty software keyboard and a bepo software keyboard.
// if shifted, choose layers based on the other software keyboard, otherwise choose only
// layers that work on the current software keyboard.
void tap_dance_default_os_layer_switch (qk_tap_dance_state_t *state, void *user_data) {
void tap_dance_default_os_layer_switch (tap_dance_state_t *state, void *user_data) {
//uint8_t shifted = (get_mods() & MOD_BIT(KC_LSFT|KC_RSFT));
bool shifted = ( keyboard_report->mods & (MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT)) );
int qwerty = on_qwerty();
@ -230,7 +230,7 @@ void tap_dance_default_os_layer_switch (qk_tap_dance_state_t *state, void *user_
* For the third point, there does exist the 'DOUBLE_SINGLE_TAP', however this is not fully tested
*
*/
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;
//key has not been interrupted, but they key is still held. Means you want to send a 'HOLD'.
@ -257,7 +257,7 @@ int cur_dance (qk_tap_dance_state_t *state) {
}
//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_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS),
[TD_TAB_BKTAB] = ACTION_TAP_DANCE_DOUBLE(KC_TAB, LSFT(KC_TAB)),

View file

@ -15,7 +15,7 @@
*/
#include "tap_dances.h"
uint8_t cur_dance(qk_tap_dance_state_t *state) {
uint8_t cur_dance(tap_dance_state_t *state) {
if (state->count == 1) {
if (state->interrupted || !state->pressed) return SINGLE_TAP;
else return SINGLE_HOLD;
@ -36,7 +36,7 @@ static tap tap_state = {
};
#ifdef TAP_DANCE_LALT_GIT
void lalt_finished(qk_tap_dance_state_t *state, void *user_data) {
void lalt_finished(tap_dance_state_t *state, void *user_data) {
tap_state.state = cur_dance(state);
switch (tap_state.state) {
case SINGLE_HOLD:
@ -49,7 +49,7 @@ void lalt_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void lalt_reset(qk_tap_dance_state_t *state, void *user_data) {
void lalt_reset(tap_dance_state_t *state, void *user_data) {
switch (tap_state.state) {
case SINGLE_HOLD:
unregister_mods(MOD_BIT(KC_LALT));
@ -65,7 +65,7 @@ void lalt_reset(qk_tap_dance_state_t *state, void *user_data) {
#ifdef TAP_DANCE_LSFT_CAPS
# ifdef LAYERS_PROGRAMMER
void pg_lsft_finished(qk_tap_dance_state_t *state, void *user_data) {
void pg_lsft_finished(tap_dance_state_t *state, void *user_data) {
tap_state.state = cur_dance(state);
switch (tap_state.state) {
case SINGLE_HOLD:
@ -80,7 +80,7 @@ void pg_lsft_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void pg_lsft_reset(qk_tap_dance_state_t *state, void *user_data) {
void pg_lsft_reset(tap_dance_state_t *state, void *user_data) {
switch (tap_state.state) {
case SINGLE_HOLD:
unregister_mods(MOD_BIT(KC_LSFT));
@ -92,7 +92,7 @@ void pg_lsft_reset(qk_tap_dance_state_t *state, void *user_data) {
# endif
#endif
qk_tap_dance_action_t tap_dance_actions[] = {
dance_action_t tap_dance_actions[] = {
#ifdef TAP_DANCE_LALT_GIT
[TD_LALT_GIT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, lalt_finished, lalt_reset),
#endif

View file

@ -45,18 +45,18 @@ enum {
#endif
};
uint8_t cur_dance(qk_tap_dance_state_t *state);
uint8_t cur_dance(tap_dance_state_t *state);
#ifdef TAP_DANCE_LALT_GIT
void lalt_finished(qk_tap_dance_state_t *state, void *user_data);
void lalt_reset(qk_tap_dance_state_t *state, void *user_data);
void lalt_finished(tap_dance_state_t *state, void *user_data);
void lalt_reset(tap_dance_state_t *state, void *user_data);
# define TD_LALT TD(TD_LALT_GIT)
#endif
#ifdef TAP_DANCE_LSFT_CAPS
# ifdef LAYERS_PROGRAMMER
void pg_lsft_finished(qk_tap_dance_state_t *state, void *user_data);
void pg_lsft_reset(qk_tap_dance_state_t *state, void *user_data);
void pg_lsft_finished(tap_dance_state_t *state, void *user_data);
void pg_lsft_reset(tap_dance_state_t *state, void *user_data);
# endif
#endif

View file

@ -2,7 +2,7 @@
// Tap dance function for enable swedish characters on first layer. Unregister to not let tap bleed over to next keypress.
// Tap dance 1
void dance_1_finished(qk_tap_dance_state_t *state, void *user_data) {
void dance_1_finished(tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
tap_code(KC_SCLN);
} else {
@ -10,7 +10,7 @@ void dance_1_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void dance_1_reset(qk_tap_dance_state_t *state, void *user_data) {
void dance_1_reset(tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
unregister_code(KC_SCLN);
} else {
@ -19,7 +19,7 @@ void dance_1_reset(qk_tap_dance_state_t *state, void *user_data) {
}
// Tap dance 2
void dance_2_finished(qk_tap_dance_state_t *state, void *user_data) {
void dance_2_finished(tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
tap_code(KC_QUOT);
} else {
@ -27,7 +27,7 @@ void dance_2_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void dance_2_reset(qk_tap_dance_state_t *state, void *user_data) {
void dance_2_reset(tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
unregister_code(KC_QUOT);
} else {
@ -36,7 +36,7 @@ void dance_2_reset(qk_tap_dance_state_t *state, void *user_data) {
}
// Tap dance 3
void dance_3_finished(qk_tap_dance_state_t *state, void *user_data) {
void dance_3_finished(tap_dance_state_t *state, void *user_data) {
// if (state->count == 2)
if (state->count == 2) {
tap_code(KC_SLSH);
@ -45,7 +45,7 @@ void dance_3_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void dance_3_reset(qk_tap_dance_state_t *state, void *user_data) {
void dance_3_reset(tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
unregister_code(KC_SLSH);
} else {
@ -54,7 +54,7 @@ void dance_3_reset(qk_tap_dance_state_t *state, void *user_data) {
}
// Tap dance 4
void dance_4_finished(qk_tap_dance_state_t *state, void *user_data) {
void dance_4_finished(tap_dance_state_t *state, void *user_data) {
// if (state->count == 2)
if (state->count == 2) {
tap_code(KC_DOT);
@ -63,7 +63,7 @@ void dance_4_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void dance_4_reset(qk_tap_dance_state_t *state, void *user_data) {
void dance_4_reset(tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
unregister_code(KC_DOT);
} else {
@ -72,7 +72,7 @@ void dance_4_reset(qk_tap_dance_state_t *state, void *user_data) {
}
// Tap dance 5
void dance_5_finished(qk_tap_dance_state_t *state, void *user_data) {
void dance_5_finished(tap_dance_state_t *state, void *user_data) {
// if (state->count == 2)
if (state->count == 2) {
tap_code(KC_DOT);
@ -81,7 +81,7 @@ void dance_5_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void dance_5_reset(qk_tap_dance_state_t *state, void *user_data) {
void dance_5_reset(tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
unregister_code(KC_DOT);
} else {
@ -90,7 +90,7 @@ void dance_5_reset(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[] = {
// simple tap dance
[TD1] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_1_finished, dance_1_reset),

View file

@ -18,7 +18,7 @@
static td_state_t td_state[3];
// determine the tapdance state to return
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;
@ -33,7 +33,7 @@ int cur_dance(qk_tap_dance_state_t *state) {
} // any number higher than the maximum state value you return above
}
void altf2_finished(qk_tap_dance_state_t *state, void *user_data) {
void altf2_finished(tap_dance_state_t *state, void *user_data) {
td_state[0] = cur_dance(state);
switch (td_state[0]) {
case SINGLE_TAP:
@ -49,7 +49,7 @@ void altf2_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void altf2_reset(qk_tap_dance_state_t *state, void *user_data) {
void altf2_reset(tap_dance_state_t *state, void *user_data) {
switch (td_state[0]) {
case SINGLE_TAP:
unregister_code(KC_F2);
@ -65,7 +65,7 @@ void altf2_reset(qk_tap_dance_state_t *state, void *user_data) {
}
void ctlf5_finished(qk_tap_dance_state_t *state, void *user_data) {
void ctlf5_finished(tap_dance_state_t *state, void *user_data) {
td_state[1] = cur_dance(state);
switch (td_state[1]) {
case SINGLE_TAP:
@ -81,7 +81,7 @@ void ctlf5_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void ctlf5_reset(qk_tap_dance_state_t *state, void *user_data) {
void ctlf5_reset(tap_dance_state_t *state, void *user_data) {
switch (td_state[1]) {
case SINGLE_TAP:
unregister_code(KC_F5);
@ -96,7 +96,7 @@ void ctlf5_reset(qk_tap_dance_state_t *state, void *user_data) {
}
}
void altf7_finished(qk_tap_dance_state_t *state, void *user_data) {
void altf7_finished(tap_dance_state_t *state, void *user_data) {
td_state[2] = cur_dance(state);
switch (td_state[2]) {
case SINGLE_TAP:
@ -112,7 +112,7 @@ void altf7_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void altf7_reset(qk_tap_dance_state_t *state, void *user_data) {
void altf7_reset(tap_dance_state_t *state, void *user_data) {
switch (td_state[2]) {
case SINGLE_TAP:
unregister_code(KC_F7);
@ -127,7 +127,7 @@ void altf7_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[] = {
[ALT_F2] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altf2_finished, altf2_reset),
[CTL_F5] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctlf5_finished, ctlf5_reset),
[ALT_F7] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altf7_finished, altf7_reset),

View file

@ -41,11 +41,11 @@ enum td_keycodes {
typedef enum { SINGLE_TAP, SINGLE_HOLD, DOUBLE_TAP } td_state_t;
int cur_dance(qk_tap_dance_state_t *state);
int cur_dance(tap_dance_state_t *state);
void altf2_finished(qk_tap_dance_state_t *state, void *user_data);
void altf2_reset(qk_tap_dance_state_t *state, void *user_data);
void ctlf5_finished(qk_tap_dance_state_t *state, void *user_data);
void ctlf5_reset(qk_tap_dance_state_t *state, void *user_data);
void altf7_finished(qk_tap_dance_state_t *state, void *user_data);
void altf7_reset(qk_tap_dance_state_t *state, void *user_data);
void altf2_finished(tap_dance_state_t *state, void *user_data);
void altf2_reset(tap_dance_state_t *state, void *user_data);
void ctlf5_finished(tap_dance_state_t *state, void *user_data);
void ctlf5_reset(tap_dance_state_t *state, void *user_data);
void altf7_finished(tap_dance_state_t *state, void *user_data);
void altf7_reset(tap_dance_state_t *state, void *user_data);

View file

@ -45,7 +45,7 @@ void send_secret_string(uint8_t n) {
// To activate SINGLE_HOLD, you will need to hold for 200ms first.
// This tap dance favors keys that are used frequently in typing like 'f'
int cur_dance(qk_tap_dance_state_t *state) {
int cur_dance(tap_dance_state_t *state) {
if (state->count == 1) {
// If count = 1, and it has been interrupted - it doesn't matter if it
// is pressed or not: Send SINGLE_TAP
@ -84,7 +84,7 @@ int cur_dance(qk_tap_dance_state_t *state) {
// This works well if you want this key to work as a "fast modifier". It favors
// being held over being tapped.
int hold_cur_dance(qk_tap_dance_state_t *state) {
int hold_cur_dance(tap_dance_state_t *state) {
if (state->count == 1) {
if (state->interrupted) {
if (!state->pressed)

View file

@ -128,7 +128,7 @@ enum {
TRIPLE_HOLD = 7
};
int cur_dance(qk_tap_dance_state_t *state); // prefer tap
int hold_cur_dance(qk_tap_dance_state_t *state); // prefer hold
int cur_dance(tap_dance_state_t *state); // prefer tap
int hold_cur_dance(tap_dance_state_t *state); // prefer hold
#endif // TAP_DANCE_ENABLE

View file

@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifdef TD_LSFT_CAPSLOCK_ENABLE
// Tap once for shift, twice for Caps Lock but only if Win Key in not disabled
void dance_LSFT_finished(qk_tap_dance_state_t *state, void *user_data) {
void dance_LSFT_finished(tap_dance_state_t *state, void *user_data) {
if (state->count == 1 || keymap_config.no_gui) {
register_code16(KC_LSFT);
} else {
@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
}
}
void dance_LSFT_reset(qk_tap_dance_state_t *state, void *user_data) {
void dance_LSFT_reset(tap_dance_state_t *state, void *user_data) {
if (state->count == 1 || keymap_config.no_gui) {
unregister_code16(KC_LSFT);
} else {
@ -38,7 +38,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
}
}
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
// Tap once for shift, twice for Caps Lock
[TD_LSFT_CAPSLOCK] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS),
[TD_LSFT_CAPS_WIN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LSFT_finished, dance_LSFT_reset),

View file

@ -1,7 +1,7 @@
#include "tap_dances.h"
/*
void macroTogKey(qk_tap_dance_state_t *state, void *user_data) {
void macroTogKey(tap_dance_state_t *state, void *user_data) {
keyrecord_t kr;
if (state->count == 1)
@ -21,7 +21,7 @@ void macroTogKey(qk_tap_dance_state_t *state, void *user_data) {
}
}
void macroTogKey2(qk_tap_dance_state_t *state, void *user_data) {
void macroTogKey2(tap_dance_state_t *state, void *user_data) {
keyrecord_t kr;
if (state->count == 1)
@ -42,7 +42,7 @@ void macroTogKey2(qk_tap_dance_state_t *state, void *user_data) {
}
*/
void pstinsrt(qk_tap_dance_state_t *state, void *user_data) {
void pstinsrt(tap_dance_state_t *state, void *user_data) {
if (state->count > 1) {
register_code(KC_LALT);
tap_code(KC_I);
@ -54,7 +54,7 @@ void pstinsrt(qk_tap_dance_state_t *state, void *user_data) {
reset_tap_dance(state);
}
void ccopy(qk_tap_dance_state_t *state, void *user_data) {
void ccopy(tap_dance_state_t *state, void *user_data) {
if (state->count > 1) {
tap_code16(C(KC_X));
@ -65,7 +65,7 @@ void ccopy(qk_tap_dance_state_t *state, void *user_data) {
reset_tap_dance(state);
}
void pstspecial(qk_tap_dance_state_t *state, void *user_data) {
void pstspecial(tap_dance_state_t *state, void *user_data) {
if (state->count > 1) {
register_code(KC_LALT);
tap_code(KC_E);
@ -82,7 +82,7 @@ void pstspecial(qk_tap_dance_state_t *state, void *user_data) {
reset_tap_dance(state);
}
void deldel(qk_tap_dance_state_t *state, void *user_data) {
void deldel(tap_dance_state_t *state, void *user_data) {
if (state->count > 1) {
register_code(KC_LALT);
tap_code(KC_E);
@ -94,7 +94,7 @@ void deldel(qk_tap_dance_state_t *state, void *user_data) {
reset_tap_dance(state);
}
void findreplace(qk_tap_dance_state_t *state, void *user_data) {
void findreplace(tap_dance_state_t *state, void *user_data) {
if (state->count > 1) {
tap_code16(C(KC_H));
} else {
@ -103,7 +103,7 @@ void findreplace(qk_tap_dance_state_t *state, void *user_data) {
reset_tap_dance(state);
}
void cyclawin(qk_tap_dance_state_t *state, void *user_data) {
void cyclawin(tap_dance_state_t *state, void *user_data) {
if (state->count > 1) {
tap_code16(C(S(KC_F6)));
} else {
@ -112,7 +112,7 @@ void cyclawin(qk_tap_dance_state_t *state, void *user_data) {
reset_tap_dance(state);
}
void SCRNSNP(qk_tap_dance_state_t *state, void *user_data) {
void SCRNSNP(tap_dance_state_t *state, void *user_data) {
if (state->count > 1) {
tap_code16(A(KC_PSCR));
} else {
@ -124,7 +124,7 @@ void SCRNSNP(qk_tap_dance_state_t *state, void *user_data) {
reset_tap_dance(state);
}
void mcccpy(qk_tap_dance_state_t *state, void *user_data) {
void mcccpy(tap_dance_state_t *state, void *user_data) {
if (state->count > 1) {
tap_code16(G(KC_X));
} else {
@ -133,7 +133,7 @@ void mcccpy(qk_tap_dance_state_t *state, void *user_data) {
reset_tap_dance(state);
}
void mcpstin(qk_tap_dance_state_t *state, void *user_data) {
void mcpstin(tap_dance_state_t *state, void *user_data) {
if (state->count > 1) {
tap_code16(G(KC_I));
} else {
@ -142,7 +142,7 @@ void mcpstin(qk_tap_dance_state_t *state, void *user_data) {
reset_tap_dance(state);
}
void enttab(qk_tap_dance_state_t *state, void *user_data) {
void enttab(tap_dance_state_t *state, void *user_data) {
if (state->count > 1) {
tap_code(KC_ENT);
} else {
@ -151,7 +151,7 @@ void enttab(qk_tap_dance_state_t *state, void *user_data) {
reset_tap_dance(state);
}
void rgb_toggle(qk_tap_dance_state_t *state, void *user_data) {
void rgb_toggle(tap_dance_state_t *state, void *user_data) {
#ifdef RGBLIGHT_ENABLE
if (state->count == 1) {
rgblight_step();
@ -162,7 +162,7 @@ void rgb_toggle(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_PSTI] = ACTION_TAP_DANCE_FN(pstinsrt),
[TD_PTSP] = ACTION_TAP_DANCE_FN(pstspecial),
[TD_FNDR] = ACTION_TAP_DANCE_FN(findreplace),

View file

@ -19,11 +19,11 @@
#define ACTION_TAP_DANCE_DOUBLE_MOD(mod1, mod2) { \
.fn = { td_double_mod_each, NULL, td_double_mod_reset }, \
.user_data = &(qk_tap_dance_pair_t){ mod1, mod2 }, \
.user_data = &(tap_dance_pair_t){ mod1, mod2 }, \
}
void td_double_mod_each(qk_tap_dance_state_t *state, void *user_data) {
qk_tap_dance_pair_t *data = (qk_tap_dance_pair_t *)user_data;
void td_double_mod_each(tap_dance_state_t *state, void *user_data) {
tap_dance_pair_t *data = (tap_dance_pair_t *)user_data;
// Single tap → mod1, double tap → mod2, triple tap etc. → mod1+mod2
if (state->count == 1 || state->count == 3) {
@ -36,8 +36,8 @@ void td_double_mod_each(qk_tap_dance_state_t *state, void *user_data) {
state->weak_mods &= ~(MOD_BIT(data->kc1) | MOD_BIT(data->kc2));
}
void td_double_mod_reset(qk_tap_dance_state_t *state, void *user_data) {
qk_tap_dance_pair_t *data = (qk_tap_dance_pair_t *)user_data;
void td_double_mod_reset(tap_dance_state_t *state, void *user_data) {
tap_dance_pair_t *data = (tap_dance_pair_t *)user_data;
if (state->count == 1 || state->count >= 3) {
unregister_code(data->kc1);
@ -49,11 +49,11 @@ void td_double_mod_reset(qk_tap_dance_state_t *state, void *user_data) {
#define ACTION_TAP_DANCE_MOD_LAYER(mod, layer) { \
.fn = { td_mod_layer_each, NULL, td_mod_layer_reset }, \
.user_data = &(qk_tap_dance_dual_role_t){ mod, layer }, \
.user_data = &(tap_dance_dual_role_t){ mod, layer }, \
}
void td_mod_layer_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_mod_layer_each(tap_dance_state_t *state, void *user_data) {
tap_dance_dual_role_t *data = (tap_dance_dual_role_t *)user_data;
// Single tap → mod, double tap → layer, triple tap etc. → mod+layer
if (state->count == 1 || state->count == 3) {
@ -66,8 +66,8 @@ void td_mod_layer_each(qk_tap_dance_state_t *state, void *user_data) {
}
}
void td_mod_layer_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_mod_layer_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 || state->count >= 3) {
unregister_code(data->kc);
@ -79,7 +79,7 @@ void td_mod_layer_reset(qk_tap_dance_state_t *state, void *user_data) {
#define ACTION_TAP_DANCE_LAYER_MOD(layer, mod) { \
.fn = { td_layer_mod_each, NULL, td_layer_mod_reset }, \
.user_data = &(qk_tap_dance_layer_mod_t){ layer, mod, 0, 0 }, \
.user_data = &(tap_dance_layer_mod_t){ layer, mod, 0, 0 }, \
}
typedef struct {
@ -87,10 +87,10 @@ typedef struct {
uint16_t kc;
bool layer_on; // Layer state when tap dance started
bool started;
} qk_tap_dance_layer_mod_t;
} tap_dance_layer_mod_t;
void td_layer_mod_each(qk_tap_dance_state_t *state, void *user_data) {
qk_tap_dance_layer_mod_t *data = (qk_tap_dance_layer_mod_t *)user_data;
void td_layer_mod_each(tap_dance_state_t *state, void *user_data) {
tap_dance_layer_mod_t *data = (tap_dance_layer_mod_t *)user_data;
if (!data->started) {
data->layer_on = IS_LAYER_ON(data->layer);
data->started = true;
@ -107,8 +107,8 @@ void td_layer_mod_each(qk_tap_dance_state_t *state, void *user_data) {
}
}
void td_layer_mod_reset(qk_tap_dance_state_t *state, void *user_data) {
qk_tap_dance_layer_mod_t *data = (qk_tap_dance_layer_mod_t *)user_data;
void td_layer_mod_reset(tap_dance_state_t *state, void *user_data) {
tap_dance_layer_mod_t *data = (tap_dance_layer_mod_t *)user_data;
if ((state->count == 1 || state->count >= 3) && !data->layer_on) {
layer_off(data->layer);
@ -120,7 +120,7 @@ void td_layer_mod_reset(qk_tap_dance_state_t *state, void *user_data) {
data->started = false;
}
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[TD_DST_A_R] = ACTION_TAP_DANCE_DOUBLE(DST_ADD, DST_REM),
[TD_RAL_RGU] = ACTION_TAP_DANCE_DOUBLE_MOD(KC_RALT, KC_RGUI),

View file

@ -1,7 +1,7 @@
#include "kuatsure.h"
#include "version.h"
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[TD_LBRC] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LT),
[TD_RBRC] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_GT),
[TD_SLSH] = ACTION_TAP_DANCE_DOUBLE(KC_SLSH, KC_BSLS),

View file

@ -1,5 +1,5 @@
#include "tap_dances.h"
void td_parenthesis (qk_tap_dance_state_t *state, void *user_data) {
void td_parenthesis (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
// SEND_STRING ("\(");
tap_code(KC_QUOT);
@ -23,7 +23,7 @@ void td_parenthesis (qk_tap_dance_state_t *state, void *user_data) {
}
}
void safe_reset(qk_tap_dance_state_t *state, void *user_data) {
void safe_reset(tap_dance_state_t *state, void *user_data) {
if (state->count >= 3) {
// Reset the keyboard if you tap the key more than three times
reset_keyboard();
@ -31,7 +31,7 @@ void safe_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_RESET] = ACTION_TAP_DANCE_FN(safe_reset),
[TD_NUM1] = ACTION_TAP_DANCE_DOUBLE(KC_1, KC_4),
[TD_NUM2] = ACTION_TAP_DANCE_DOUBLE(KC_2, KC_5),

View file

@ -23,4 +23,4 @@ enum {
TD_ABR // single double angle brackets
};
#endif // TAP_DANCE_ENABLE
void td_parenthesis (qk_tap_dance_state_t *state, void *user_data);
void td_parenthesis (tap_dance_state_t *state, void *user_data);

View file

@ -17,7 +17,7 @@ enum tap_dance_keycodes {
Used to indicate a CTRL should be pressed on one press, or CTRL+ALT on
a double tap
*/
void dance_ctl_ctlalt_each(qk_tap_dance_state_t *state, void *user_data) {
void dance_ctl_ctlalt_each(tap_dance_state_t *state, void *user_data) {
register_code(KC_LCTL);
if(state->count > 1) {
register_code(KC_LALT);
@ -25,7 +25,7 @@ void dance_ctl_ctlalt_each(qk_tap_dance_state_t *state, void *user_data) {
}
/* Used to release CTRL or the double tapped variant CTRL+ALT */
void dance_ctl_ctlalt_reset(qk_tap_dance_state_t *state, void *user_data) {
void dance_ctl_ctlalt_reset(tap_dance_state_t *state, void *user_data) {
unregister_code(KC_LCTL);
if(state->count > 1) {
unregister_code(KC_LALT);
@ -37,7 +37,7 @@ void dance_ctl_ctlalt_reset(qk_tap_dance_state_t *state, void *user_data) {
Each is used to make sure ADJUST activates as soon as it's pressed the first
time.
*/
void dance_adj_each(qk_tap_dance_state_t *state, void *user_data) {
void dance_adj_each(tap_dance_state_t *state, void *user_data) {
if(state->count == 1) {
layer_on(_ADJUST);
} else {
@ -46,7 +46,7 @@ void dance_adj_each(qk_tap_dance_state_t *state, void *user_data) {
}
/* Set NUMPAD layer on second tap and MOUSE layer on 3rd */
void dance_adj_finish(qk_tap_dance_state_t *state, void *user_data) {
void dance_adj_finish(tap_dance_state_t *state, void *user_data) {
switch(state->count) {
case 1: break;
case 2:
@ -62,7 +62,7 @@ void dance_adj_finish(qk_tap_dance_state_t *state, void *user_data) {
}
/* Turn off any layer that may have been tapped on */
void dance_adj_reset(qk_tap_dance_state_t *state, void *user_data) {
void dance_adj_reset(tap_dance_state_t *state, void *user_data) {
switch(state->count) {
case 1:
layer_off(_ADJUST);
@ -76,7 +76,7 @@ void dance_adj_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_CTL_CTLALT] = ACTION_TAP_DANCE_FN_ADVANCED(dance_ctl_ctlalt_each, NULL, dance_ctl_ctlalt_reset),
[TD_LGUI_RGUI] = ACTION_TAP_DANCE_DOUBLE(KC_LGUI, KC_RGUI),
[TD_LALT_RALT] = ACTION_TAP_DANCE_DOUBLE(KC_LALT, KC_RALT),

View file

@ -17,14 +17,14 @@ MIRYOKU_LAYER_LIST
#undef MIRYOKU_X
};
void u_td_fn_boot(qk_tap_dance_state_t *state, void *user_data) { \
void u_td_fn_boot(tap_dance_state_t *state, void *user_data) { \
if (state->count == 2) {
reset_keyboard();
}
}
#define MIRYOKU_X(LAYER, STRING) \
void u_td_fn_U_##LAYER(qk_tap_dance_state_t *state, void *user_data) { \
void u_td_fn_U_##LAYER(tap_dance_state_t *state, void *user_data) { \
if (state->count == 2) { \
default_layer_set((layer_state_t)1 << U_##LAYER); \
} \
@ -32,7 +32,7 @@ void u_td_fn_U_##LAYER(qk_tap_dance_state_t *state, void *user_data) { \
MIRYOKU_LAYER_LIST
#undef MIRYOKU_X
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[U_TD_BOOT] = ACTION_TAP_DANCE_FN(u_td_fn_boot),
#define MIRYOKU_X(LAYER, STRING) [U_TD_U_##LAYER] = ACTION_TAP_DANCE_FN(u_td_fn_U_##LAYER),
MIRYOKU_LAYER_LIST

View file

@ -54,7 +54,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// Tap Dance
// Determine the current tap dance state
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;
@ -79,7 +79,7 @@ int cur_dance(qk_tap_dance_state_t *state) {
static tap ae_tap_state = {.is_press_action = true, .state = 0};
void ae_finished(qk_tap_dance_state_t *state, void *user_data) {
void ae_finished(tap_dance_state_t *state, void *user_data) {
ae_tap_state.state = cur_dance(state);
switch (ae_tap_state.state) {
case SINGLE_TAP:
@ -95,7 +95,7 @@ void ae_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void ae_reset(qk_tap_dance_state_t *state, void *user_data) {
void ae_reset(tap_dance_state_t *state, void *user_data) {
switch (ae_tap_state.state) {
case SINGLE_TAP:
unregister_code(KC_A);
@ -109,7 +109,7 @@ void ae_reset(qk_tap_dance_state_t *state, void *user_data) {
static tap aa_tap_state = {.is_press_action = true, .state = 0};
void aa_finished(qk_tap_dance_state_t *state, void *user_data) {
void aa_finished(tap_dance_state_t *state, void *user_data) {
aa_tap_state.state = cur_dance(state);
switch (aa_tap_state.state) {
case SINGLE_TAP:
@ -126,7 +126,7 @@ void aa_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void aa_reset(qk_tap_dance_state_t *state, void *user_data) {
void aa_reset(tap_dance_state_t *state, void *user_data) {
switch (aa_tap_state.state) {
case SINGLE_TAP:
unregister_code(SE_ODIA);
@ -139,7 +139,7 @@ void aa_reset(qk_tap_dance_state_t *state, void *user_data) {
}
// clang-format off
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[AAE] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ae_finished, ae_reset),
[OAA] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, aa_finished, aa_reset)
};

View file

@ -27,7 +27,7 @@ static td_tap_t lyr_tap_state = {.is_press_action = true, .state = TD_NONE};
* @param A tap dance state struct.
* @return A struct.
*/
td_state_t cur_dance(qk_tap_dance_state_t *state) {
td_state_t cur_dance(tap_dance_state_t *state) {
switch (state->count) {
case 1:
if (!state->pressed)
@ -49,7 +49,7 @@ td_state_t cur_dance(qk_tap_dance_state_t *state) {
}
// Functions that control what our tap dance key does
__attribute__((weak)) void td_layer_finished(qk_tap_dance_state_t *state, void *user_data) {
__attribute__((weak)) void td_layer_finished(tap_dance_state_t *state, void *user_data) {
lyr_tap_state.state = cur_dance(state);
switch (lyr_tap_state.state) {
case TD_1X_TAP:
@ -87,7 +87,7 @@ __attribute__((weak)) void td_layer_finished(qk_tap_dance_state_t *state, void *
}
}
__attribute__((weak)) void td_layer_reset(qk_tap_dance_state_t *state, void *user_data) {
__attribute__((weak)) void td_layer_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 (lyr_tap_state.state == TD_1X_HOLD) {
layer_off(_ADJUST);

View file

@ -51,7 +51,7 @@ typedef struct {
* @param A tap dance state struct.
* @return A struct.
*/
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
@ -63,7 +63,7 @@ td_state_t cur_dance(qk_tap_dance_state_t *state);
* @param user_data Pointer to user data.
* @return None.
*/
void td_layer_finished(qk_tap_dance_state_t *state, void *user_data);
void td_layer_finished(tap_dance_state_t *state, void *user_data);
/* @brief Reset tap dance actions.
*
@ -73,10 +73,10 @@ void td_layer_finished(qk_tap_dance_state_t *state, void *user_data);
* @param user_data Pointer to user data.
* @return None.
*/
void td_layer_reset(qk_tap_dance_state_t *state, void *user_data);
void td_layer_reset(tap_dance_state_t *state, void *user_data);
/* Define tap dance actions.
*/
__attribute__((weak))
qk_tap_dance_action_t tap_dance_actions[1] = {[TD_LAYERS] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, td_layer_finished, td_layer_reset, 275)};
tap_dance_action_t tap_dance_actions[1] = {[TD_LAYERS] = ACTION_TAP_DANCE_FN_ADVANCED_TIME(NULL, td_layer_finished, td_layer_reset, 275)};
#endif

View file

@ -1,7 +1,7 @@
#include "ninjonas.h"
//// BEGIN: Advanced Tap Dances
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;
//key has not been interrupted, but they key is still held. Means you want to send a 'HOLD'.
@ -34,7 +34,7 @@ static tap copy_paste_app_tap_state = {
.state = 0
};
void copy_paste_app_finished (qk_tap_dance_state_t *state, void *user_data) {
void copy_paste_app_finished (tap_dance_state_t *state, void *user_data) {
copy_paste_app_tap_state.state = cur_dance(state);
switch (copy_paste_app_tap_state.state) {
case SINGLE_TAP:
@ -56,7 +56,7 @@ void copy_paste_app_finished (qk_tap_dance_state_t *state, void *user_data) {
}
}
void copy_paste_app_reset (qk_tap_dance_state_t *state, void *user_data) {
void copy_paste_app_reset (tap_dance_state_t *state, void *user_data) {
copy_paste_app_tap_state.state = 0;
}
// END: Copy, Paste, Apps
@ -67,7 +67,7 @@ static tap y_numpad_tap_state = {
.state = 0
};
void y_numpad_finished (qk_tap_dance_state_t *state, void *user_data) {
void y_numpad_finished (tap_dance_state_t *state, void *user_data) {
y_numpad_tap_state.state = cur_dance(state);
switch (y_numpad_tap_state.state) {
case SINGLE_TAP:
@ -86,7 +86,7 @@ void y_numpad_finished (qk_tap_dance_state_t *state, void *user_data) {
}
}
void y_numpad_reset (qk_tap_dance_state_t *state, void *user_data) {
void y_numpad_reset (tap_dance_state_t *state, void *user_data) {
switch (y_numpad_tap_state.state) {
case SINGLE_HOLD:
unregister_code16(KC_Y);
@ -98,7 +98,7 @@ void y_numpad_reset (qk_tap_dance_state_t *state, void *user_data) {
//// END: Advanced Tap Dances
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_LBRC_BACK] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, LGUI(KC_LBRC)),
[TD_RBRC_FWD] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, LGUI(KC_RBRC)),

View file

@ -16,7 +16,7 @@
#include "nstickney.h"
// Tap Dancing
void dance_layer(qk_tap_dance_state_t *state, void *user_data) {
void dance_layer(tap_dance_state_t *state, void *user_data) {
switch (state->count) {
case 1:
tap_code(KC_APP);
@ -32,7 +32,7 @@ void dance_layer(qk_tap_dance_state_t *state, void *user_data) {
}
};
void dance_lock_finished(qk_tap_dance_state_t *state, void *user_data) {
void dance_lock_finished(tap_dance_state_t *state, void *user_data) {
switch (state->count) {
case 1:
register_code(KC_LGUI);
@ -51,7 +51,7 @@ void dance_lock_finished(qk_tap_dance_state_t *state, void *user_data) {
}
};
void dance_lock_reset(qk_tap_dance_state_t *state, void *user_data) {
void dance_lock_reset(tap_dance_state_t *state, void *user_data) {
switch (state->count) {
case 1:
unregister_code(KC_LGUI);
@ -70,7 +70,7 @@ void dance_lock_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[] = {
[LOCKS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_lock_finished, dance_lock_reset),
[LAYERS] = ACTION_TAP_DANCE_FN(dance_layer)
};

View file

@ -75,7 +75,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
#ifdef TAP_DANCE_ENABLE
qk_tap_dance_action_t tap_dance_actions[] = {};
tap_dance_action_t tap_dance_actions[] = {};
#endif
void keyboard_post_init_rgb_light(void) {

View file

@ -18,7 +18,7 @@
#include <string.h>
// Tap Dance functions
void dance_key_a (qk_tap_dance_state_t *state, void *user_data) {
void dance_key_a (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
SEND_STRING("a");
reset_tap_dance(state);
@ -33,7 +33,7 @@ void dance_key_a (qk_tap_dance_state_t *state, void *user_data) {
}
}
void dance_key_e (qk_tap_dance_state_t *state, void *user_data) {
void dance_key_e (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
SEND_STRING("e");
reset_tap_dance(state);
@ -48,7 +48,7 @@ void dance_key_e (qk_tap_dance_state_t *state, void *user_data) {
}
}
void dance_key_i (qk_tap_dance_state_t *state, void *user_data) {
void dance_key_i (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
SEND_STRING("i");
reset_tap_dance(state);
@ -63,7 +63,7 @@ void dance_key_i (qk_tap_dance_state_t *state, void *user_data) {
}
}
void dance_key_o (qk_tap_dance_state_t *state, void *user_data) {
void dance_key_o (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
SEND_STRING("o");
reset_tap_dance(state);
@ -94,7 +94,7 @@ void dance_key_o (qk_tap_dance_state_t *state, void *user_data) {
}
}
void dance_key_u (qk_tap_dance_state_t *state, void *user_data) {
void dance_key_u (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
SEND_STRING("u");
reset_tap_dance(state);

View file

@ -49,11 +49,11 @@ enum {
TD_U,
};
void dance_key_a (qk_tap_dance_state_t *, void *);
void dance_key_e (qk_tap_dance_state_t *, void *);
void dance_key_i (qk_tap_dance_state_t *, void *);
void dance_key_o (qk_tap_dance_state_t *, void *);
void dance_key_u (qk_tap_dance_state_t *, void *);
void dance_key_a (tap_dance_state_t *, void *);
void dance_key_e (tap_dance_state_t *, void *);
void dance_key_i (tap_dance_state_t *, void *);
void dance_key_o (tap_dance_state_t *, void *);
void dance_key_u (tap_dance_state_t *, void *);
layer_state_t layer_state_set_user(layer_state_t);
bool process_record_user(uint16_t keycode, keyrecord_t *record);

View file

@ -1,13 +1,13 @@
#include "ridingqwerty.h"
#include "tapdances.h"
void braces_finished (qk_tap_dance_state_t *state, void *user_data) {
void braces_finished (tap_dance_state_t *state, void *user_data) {
if ((state->count == 1) || (state->count == 3)) {
register_code(KC_LSFT);
}
}
void braces_reset (qk_tap_dance_state_t *state, void *user_data) {
void braces_reset (tap_dance_state_t *state, void *user_data) {
// two or three taps for "[]"/"{}"
if ((state->count == 2) || (state->count == 3)) {
tap_code(KC_LBRC);
@ -28,6 +28,6 @@ void braces_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_BRACES] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, braces_finished, braces_reset)
};

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);

View file

@ -2,7 +2,7 @@
#include "tapdances.h"
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[SHCAP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, caps, shift_reset)
,[TDGUI] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, shiftgui, gui_reset)
,[TDGUI2] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, guictl, ubermod_reset)
@ -22,13 +22,13 @@ qk_tap_dance_action_t tap_dance_actions[] = {
,[FRBK] = ACTION_TAP_DANCE_DOUBLE(KC_WWW_BACK,KC_WWW_FORWARD)
};
void caps(qk_tap_dance_state_t *state, void *user_data) // Shift, Caps
void caps(tap_dance_state_t *state, void *user_data) // Shift, Caps
{ if (state->count >= 2) {register_code(KC_CAPS); unregister_code(KC_CAPS);}
else if (state->pressed) {register_mods(MOD_LSFT);} else {set_oneshot_mods(MOD_LSFT);}
reset_tap_dance(state);
}
void forward_back_mac(qk_tap_dance_state_t *state, void *user_data) // G<-, then G->
void forward_back_mac(tap_dance_state_t *state, void *user_data) // G<-, then G->
{
if (state->count > 1) {
tap_code16(G(KC_RGHT));
@ -39,7 +39,7 @@ void forward_back_mac(qk_tap_dance_state_t *state, void *user_data) // G<-, then
reset_tap_dance(state);
}
void shiftgui(qk_tap_dance_state_t *state, void *user_data) // G->SG
void shiftgui(tap_dance_state_t *state, void *user_data) // G->SG
{
if (state->count > 1) {
if (state->pressed) {
@ -58,7 +58,7 @@ void shiftgui(qk_tap_dance_state_t *state, void *user_data) // G->SG
reset_tap_dance(state);
}
void guictl(qk_tap_dance_state_t *state, void *user_data) // G->GC
void guictl(tap_dance_state_t *state, void *user_data) // G->GC
{
if (state->count > 1) {
if (state->pressed) {
@ -77,7 +77,7 @@ void guictl(qk_tap_dance_state_t *state, void *user_data) // G->GC
reset_tap_dance(state);
}
void deleter(qk_tap_dance_state_t *state, void *user_data) // bkspc -> delwrd -> delline
void deleter(tap_dance_state_t *state, void *user_data) // bkspc -> delwrd -> delline
{
if (state->count > 3) {
tap_code16(G(KC_BSPC));
@ -91,7 +91,7 @@ void deleter(qk_tap_dance_state_t *state, void *user_data) // bkspc -> delwrd ->
reset_tap_dance(state);
}
void ubermod(qk_tap_dance_state_t *state, void *user_data) // CTL->ALT->GUI
void ubermod(tap_dance_state_t *state, void *user_data) // CTL->ALT->GUI
{
if (state->count > 2) {
if (state->pressed) {
@ -118,7 +118,7 @@ void ubermod(qk_tap_dance_state_t *state, void *user_data) // CTL->ALT->GUI
reset_tap_dance(state);
}
void ubermod_mac(qk_tap_dance_state_t *state, void *user_data) // GUI->CTL->ALT
void ubermod_mac(tap_dance_state_t *state, void *user_data) // GUI->CTL->ALT
{
if (state->count > 2) {
if (state->pressed) {
@ -145,7 +145,7 @@ void ubermod_mac(qk_tap_dance_state_t *state, void *user_data) // GUI->CTL->ALT
reset_tap_dance(state);
}
void ubermod2(qk_tap_dance_state_t *state, void *user_data) // ALT->CTL->GUI
void ubermod2(tap_dance_state_t *state, void *user_data) // ALT->CTL->GUI
{
if (state->count > 2) {
if (state->pressed) {
@ -172,7 +172,7 @@ void ubermod2(qk_tap_dance_state_t *state, void *user_data) // ALT->CTL->GUI
reset_tap_dance(state);
}
void ubermod2_mac(qk_tap_dance_state_t *state, void *user_data) // ALT->GUI->CTL
void ubermod2_mac(tap_dance_state_t *state, void *user_data) // ALT->GUI->CTL
{
if (state->count > 2) {
if (state->pressed) {
@ -199,30 +199,30 @@ void ubermod2_mac(qk_tap_dance_state_t *state, void *user_data) // ALT->GUI->CTL
reset_tap_dance(state);
}
void shift_reset(qk_tap_dance_state_t *state, void *user_data)
void shift_reset(tap_dance_state_t *state, void *user_data)
{
unregister_mods(MOD_LSFT);
// clear_oneshot_mods();
}
void gui_reset(qk_tap_dance_state_t *state, void *user_data)
void gui_reset(tap_dance_state_t *state, void *user_data)
{
unregister_mods(MOD_LSFT | MOD_LGUI);
}
void CAS_reset(qk_tap_dance_state_t *state, void *user_data)
void CAS_reset(tap_dance_state_t *state, void *user_data)
{
unregister_mods(MOD_LCTL | MOD_LSFT | MOD_LALT);
}
void CASG_reset(qk_tap_dance_state_t *state, void *user_data)
void CASG_reset(tap_dance_state_t *state, void *user_data)
{
unregister_mods(MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI);
// clear_oneshot_mods();
}
void ubermod_reset(qk_tap_dance_state_t *state, void *user_data) // AKA CAG_reset
void ubermod_reset(tap_dance_state_t *state, void *user_data) // AKA CAG_reset
{
unregister_mods(MOD_LCTL | MOD_LALT | MOD_LGUI);
}
void shiftenter(qk_tap_dance_state_t *state, void *user_data)
void shiftenter(tap_dance_state_t *state, void *user_data)
{
if (state->count > 1) {
tap_code(KC_ENT);
@ -236,7 +236,7 @@ void shiftenter(qk_tap_dance_state_t *state, void *user_data)
reset_tap_dance(state);
}
void shiftentercaps(qk_tap_dance_state_t *state, void *user_data)
void shiftentercaps(tap_dance_state_t *state, void *user_data)
{
if (state->count > 2) {
tap_code(KC_CAPS);
@ -253,7 +253,7 @@ void shiftentercaps(qk_tap_dance_state_t *state, void *user_data)
reset_tap_dance(state);
}
void ctrl_all_mac(qk_tap_dance_state_t *state, void *user_data) // C->CG->CAG
void ctrl_all_mac(tap_dance_state_t *state, void *user_data) // C->CG->CAG
{
if (state->count > 2) {
if (state->pressed) {
@ -280,7 +280,7 @@ void ctrl_all_mac(qk_tap_dance_state_t *state, void *user_data) // C->CG->CAG
reset_tap_dance(state);
}
void ctrl_all(qk_tap_dance_state_t *state, void *user_data) // C->CA->SC
void ctrl_all(tap_dance_state_t *state, void *user_data) // C->CA->SC
{
if (state->count > 2) {
if (state->pressed) {
@ -307,7 +307,7 @@ void ctrl_all(qk_tap_dance_state_t *state, void *user_data) // C->CA->SC
reset_tap_dance(state);
}
void alt_all(qk_tap_dance_state_t *state, void *user_data) // A->SA->AC
void alt_all(tap_dance_state_t *state, void *user_data) // A->SA->AC
{
if (state->count > 2) {
if (state->pressed) {
@ -334,7 +334,7 @@ void alt_all(qk_tap_dance_state_t *state, void *user_data) // A->SA->AC
reset_tap_dance(state);
}
void shift_and(qk_tap_dance_state_t *state, void *user_data) // SC->SA->SG
void shift_and(tap_dance_state_t *state, void *user_data) // SC->SA->SG
{
if (state->count > 2) {
if (state->pressed) {
@ -361,7 +361,7 @@ void shift_and(qk_tap_dance_state_t *state, void *user_data) // SC->SA->SG
reset_tap_dance(state);
}
void shift_and_mac(qk_tap_dance_state_t *state, void *user_data) // SG->SC->SA
void shift_and_mac(tap_dance_state_t *state, void *user_data) // SG->SC->SA
{
if (state->count > 1) {
if (state->pressed) {

View file

@ -3,27 +3,27 @@
#include "process_tap_dance.h"
#include "action.h"
void caps(qk_tap_dance_state_t *state, void *user_data); // Shift, Caps
void forward_back_mac(qk_tap_dance_state_t *state, void *user_data); // G<-, then G->
void shiftgui(qk_tap_dance_state_t *state, void *user_data); // G->SG
void guictl(qk_tap_dance_state_t *state, void *user_data); // G->GC
void deleter(qk_tap_dance_state_t *state, void *user_data); // bkspc -> delwrd -> delline
void ubermod(qk_tap_dance_state_t *state, void *user_data); // CTL->ALT->GUI
void ubermod_mac(qk_tap_dance_state_t *state, void *user_data); // GUI->CTL->ALT
void ubermod2(qk_tap_dance_state_t *state, void *user_data); // ALT->CTL->GUI
void ubermod2_mac(qk_tap_dance_state_t *state, void *user_data); // ALT->GUI->CTL
void shift_reset(qk_tap_dance_state_t *state, void *user_data);
void gui_reset(qk_tap_dance_state_t *state, void *user_data);
void CAS_reset(qk_tap_dance_state_t *state, void *user_data);
void CASG_reset(qk_tap_dance_state_t *state, void *user_data);
void ubermod_reset(qk_tap_dance_state_t *state, void *user_data); // AKA CAG_reset
void shiftenter(qk_tap_dance_state_t *state, void *user_data);
void shiftentercaps(qk_tap_dance_state_t *state, void *user_data);
void ctrl_all_mac(qk_tap_dance_state_t *state, void *user_data); // C->CG->CAG
void ctrl_all(qk_tap_dance_state_t *state, void *user_data); // C->CA->SC
void alt_all(qk_tap_dance_state_t *state, void *user_data); // A->SA->AC
void shift_and(qk_tap_dance_state_t *state, void *user_data); // SC->SA->SG
void shift_and_mac(qk_tap_dance_state_t *state, void *user_data); // SG->SC->SA
void caps(tap_dance_state_t *state, void *user_data); // Shift, Caps
void forward_back_mac(tap_dance_state_t *state, void *user_data); // G<-, then G->
void shiftgui(tap_dance_state_t *state, void *user_data); // G->SG
void guictl(tap_dance_state_t *state, void *user_data); // G->GC
void deleter(tap_dance_state_t *state, void *user_data); // bkspc -> delwrd -> delline
void ubermod(tap_dance_state_t *state, void *user_data); // CTL->ALT->GUI
void ubermod_mac(tap_dance_state_t *state, void *user_data); // GUI->CTL->ALT
void ubermod2(tap_dance_state_t *state, void *user_data); // ALT->CTL->GUI
void ubermod2_mac(tap_dance_state_t *state, void *user_data); // ALT->GUI->CTL
void shift_reset(tap_dance_state_t *state, void *user_data);
void gui_reset(tap_dance_state_t *state, void *user_data);
void CAS_reset(tap_dance_state_t *state, void *user_data);
void CASG_reset(tap_dance_state_t *state, void *user_data);
void ubermod_reset(tap_dance_state_t *state, void *user_data); // AKA CAG_reset
void shiftenter(tap_dance_state_t *state, void *user_data);
void shiftentercaps(tap_dance_state_t *state, void *user_data);
void ctrl_all_mac(tap_dance_state_t *state, void *user_data); // C->CG->CAG
void ctrl_all(tap_dance_state_t *state, void *user_data); // C->CA->SC
void alt_all(tap_dance_state_t *state, void *user_data); // A->SA->AC
void shift_and(tap_dance_state_t *state, void *user_data); // SC->SA->SG
void shift_and_mac(tap_dance_state_t *state, void *user_data); // SG->SC->SA
enum {
SHCAP = 0

View file

@ -42,7 +42,7 @@ float tone_windows[][2] = SONG(UNICODE_WINDOWS);
|*-----TAP-DANCE-----*|
\*-------------------*/
#ifdef TAP_DANCE_ENABLE
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
// Shift on double tap of semicolon
[SCL] = ACTION_TAP_DANCE_DOUBLE( KC_SCLN, KC_COLN )
};

View file

@ -16,7 +16,7 @@
#include "tap_dance.h"
// Shamelessly stolen from QMK Docs
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;
@ -44,7 +44,7 @@ tap caps_status = {
};
void dance_ecap_finished (qk_tap_dance_state_t *state, void *user_data){
void dance_ecap_finished (tap_dance_state_t *state, void *user_data){
caps_status.state = cur_dance(state);
switch(caps_status.state){
case SINGLE_TAP:
@ -74,7 +74,7 @@ void dance_ecap_finished (qk_tap_dance_state_t *state, void *user_data){
}
}
void dance_ecap_reset (qk_tap_dance_state_t *state, void *user_data){
void dance_ecap_reset (tap_dance_state_t *state, void *user_data){
if(caps_status.state == SINGLE_HOLD){
unregister_code(KC_LCTL);
}
@ -82,7 +82,7 @@ void dance_ecap_reset (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[] = {
//Tap once for Esc, twice for Caps Lock
[TD_ECAP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_ecap_finished, dance_ecap_reset),
// Other declarations would go here, separated by commas, if you have them

View file

@ -8,7 +8,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
}
// determine the tapdance state to return
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; }
@ -18,7 +18,7 @@ int cur_dance (qk_tap_dance_state_t *state) {
}
// handle the possible states for each tapdance keycode you define:
void ctl_copy_finished (qk_tap_dance_state_t *state, void *user_data) {
void ctl_copy_finished (tap_dance_state_t *state, void *user_data) {
td_state = cur_dance(state);
switch (td_state) {
case SINGLE_TAP:
@ -32,7 +32,7 @@ void ctl_copy_finished (qk_tap_dance_state_t *state, void *user_data) {
}
}
void ctl_copy_reset (qk_tap_dance_state_t *state, void *user_data) {
void ctl_copy_reset (tap_dance_state_t *state, void *user_data) {
switch (td_state) {
case SINGLE_TAP:
break;
@ -61,7 +61,7 @@ void ctl_copy_reset (qk_tap_dance_state_t *state, void *user_data) {
static uint8_t led_user = 0;
#endif
void lock_unlock (qk_tap_dance_state_t *state, void *user_data) {
void lock_unlock (tap_dance_state_t *state, void *user_data) {
td_state = cur_dance(state);
switch (td_state) {
case SINGLE_TAP: // Ctl + Alt + Del to unlock workstation
@ -97,7 +97,7 @@ void lock_unlock (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_WIN] = ACTION_TAP_DANCE_FN(lock_unlock),
[TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_GRV),
[TD_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctl_copy_finished, ctl_copy_reset)

View file

@ -48,8 +48,8 @@ typedef enum {
} td_state_t;
// function to determine the current tapdance state
int cur_dance (qk_tap_dance_state_t *state);
int cur_dance (tap_dance_state_t *state);
// `finished` and `reset` functions for each tapdance keycode
void ctl_copy_finished (qk_tap_dance_state_t *state, void *user_data);
void ctl_copy_reset (qk_tap_dance_state_t *state, void *user_data);
void ctl_copy_finished (tap_dance_state_t *state, void *user_data);
void ctl_copy_reset (tap_dance_state_t *state, void *user_data);

View file

@ -19,14 +19,14 @@ static struct {
} function_state = {0};
// Send semi-colon + enter on two taps
void tap_dance_function_finished(qk_tap_dance_state_t *state, void *user_data) {
void tap_dance_function_finished(tap_dance_state_t *state, void *user_data) {
function_state.state = hold_cur_dance(state);
switch (function_state.state) {
case SINGLE_HOLD: layer_on(_ADJUST); break;
}
}
void tap_dance_function_reset(qk_tap_dance_state_t *state, void *user_data) {
void tap_dance_function_reset(tap_dance_state_t *state, void *user_data) {
switch (function_state.state) {
case SPECIAL: reset_keyboard(); break;
case SINGLE_HOLD: layer_off(_ADJUST); break;

View file

@ -15,7 +15,7 @@
*/
// Send `. ~. ```
void tap_dance_grave_finished(qk_tap_dance_state_t *state, void *user_data) {
void tap_dance_grave_finished(tap_dance_state_t *state, void *user_data) {
switch(state->count) {
case 1:
SEND_STRING("`");
@ -26,7 +26,7 @@ void tap_dance_grave_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void tap_dance_grave_each(qk_tap_dance_state_t *state, void *user_data) {
void tap_dance_grave_each(tap_dance_state_t *state, void *user_data) {
if(state->count == 3) {
SEND_STRING("```");
} else if (state->count > 3) {

View file

@ -19,7 +19,7 @@ static struct {
} lock_state = {0};
// Send semi-colon + enter on two taps
void tap_dance_lock_finished(qk_tap_dance_state_t *state, void *user_data) {
void tap_dance_lock_finished(tap_dance_state_t *state, void *user_data) {
lock_state.state = cur_dance(state);
switch (lock_state.state) {
case SINGLE_TAP: register_code(KC_ESC); break;
@ -27,7 +27,7 @@ void tap_dance_lock_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void tap_dance_lock_reset(qk_tap_dance_state_t *state, void *user_data) {
void tap_dance_lock_reset(tap_dance_state_t *state, void *user_data) {
switch (lock_state.state) {
case SINGLE_TAP: unregister_code(KC_ESC); break;
}

View file

@ -19,12 +19,12 @@ static struct {
bool mods;
} tap_state = {0};
void tap_dance_semicolon_each(qk_tap_dance_state_t *state, void *user_data) {
void tap_dance_semicolon_each(tap_dance_state_t *state, void *user_data) {
tap_state.mods |= get_mods();
}
// Send semi-colon + enter on two taps
void tap_dance_semicolon_finished(qk_tap_dance_state_t *state, void *user_data) {
void tap_dance_semicolon_finished(tap_dance_state_t *state, void *user_data) {
tap_state.semicolon = hold_cur_dance(state);
switch (tap_state.semicolon) {
case SINGLE_TAP: case DOUBLE_HOLD: register_code(KC_SCLN); break;
@ -32,7 +32,7 @@ void tap_dance_semicolon_finished(qk_tap_dance_state_t *state, void *user_data)
}
}
void tap_dance_semicolon_reset(qk_tap_dance_state_t *state, void *user_data) {
void tap_dance_semicolon_reset(tap_dance_state_t *state, void *user_data) {
switch (tap_state.semicolon) {
case SINGLE_TAP: case DOUBLE_HOLD: unregister_code(KC_SCLN); break;
case DOUBLE_TAP: {

View file

@ -20,7 +20,7 @@
#include "actions/td.semicolon.c"
#include "actions/td.function.c"
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[TD_SEMICOLON] = ACTION_TAP_DANCE_FN_ADVANCED(tap_dance_semicolon_each, tap_dance_semicolon_finished, tap_dance_semicolon_reset),
[TD_LOCK] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_lock_finished, tap_dance_lock_reset),
[TD_GRAVE] = ACTION_TAP_DANCE_FN_ADVANCED(tap_dance_grave_each, tap_dance_grave_finished, NULL),

View file

@ -16,7 +16,7 @@
#include "tapdance.h"
int cur_dance (qk_tap_dance_state_t *state) {
int cur_dance (tap_dance_state_t *state) {
if (state->count == 1) {
//If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP
if (state->interrupted) {
@ -45,7 +45,7 @@ int cur_dance (qk_tap_dance_state_t *state) {
else return SPECIAL;
}
int hold_cur_dance (qk_tap_dance_state_t *state) {
int hold_cur_dance (tap_dance_state_t *state) {
if (state->count == 1) {
if (state->interrupted) {
if (!state->pressed) return SINGLE_TAP;

View file

@ -25,5 +25,5 @@ enum {
SPECIAL = 8
};
int cur_dance (qk_tap_dance_state_t *state);
int hold_cur_dance (qk_tap_dance_state_t *state);
int cur_dance (tap_dance_state_t *state);
int hold_cur_dance (tap_dance_state_t *state);

View file

@ -79,7 +79,7 @@ void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode
}
#endif //RGB_MATRIX_ENABLE
void dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) {
void dance_cln_finished (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
register_code16(S(KC_2));
} else {
@ -87,14 +87,14 @@ void dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) {
}
}
void dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) {
void dance_cln_reset (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
unregister_code16(S(KC_2));
} else {
}
}
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[KC_EMAIL] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_cln_finished, dance_cln_reset),
[TD_SFT_CPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS),
};

View file

@ -27,7 +27,7 @@ typedef struct {
int state;
} tap;
int cur_dance (qk_tap_dance_state_t *state) {
int cur_dance (tap_dance_state_t *state) {
if (state->count == 1) {
//If count = 1, and it has been interrupted - it doesn't matter if it is pressed or not: Send SINGLE_TAP
if (state->interrupted || !state->pressed) return SINGLE_TAP;
@ -59,7 +59,7 @@ static tap CADtap_state = {
.state = 0
};
void CAD_finished (qk_tap_dance_state_t *state, void *user_data) {
void CAD_finished (tap_dance_state_t *state, void *user_data) {
CADtap_state.state = cur_dance(state);
switch (CADtap_state.state) {
case SINGLE_TAP:
@ -102,7 +102,7 @@ void CAD_finished (qk_tap_dance_state_t *state, void *user_data) {
}
}
void CAD_reset (qk_tap_dance_state_t *state, void *user_data) {
void CAD_reset (tap_dance_state_t *state, void *user_data) {
switch (CADtap_state.state) {
//nothing to do
}
@ -115,7 +115,7 @@ static tap RSTtap_state = {
.state = 0
};
void RST_finished (qk_tap_dance_state_t *state, void *user_data) {
void RST_finished (tap_dance_state_t *state, void *user_data) {
RSTtap_state.state = cur_dance(state);
switch (RSTtap_state.state) {
case SINGLE_TAP: register_code(KC_LCTL); break;
@ -125,7 +125,7 @@ void RST_finished (qk_tap_dance_state_t *state, void *user_data) {
}
}
void RST_reset (qk_tap_dance_state_t *state, void *user_data) {
void RST_reset (tap_dance_state_t *state, void *user_data) {
switch (RSTtap_state.state) {
case SINGLE_TAP: unregister_code(KC_LCTL); break;
case SINGLE_HOLD: unregister_code(KC_LCTL); break;
@ -140,7 +140,7 @@ static tap LYRtap_state = {
.state = 0
};
void LYR_finished (qk_tap_dance_state_t *state, void *user_data) {
void LYR_finished (tap_dance_state_t *state, void *user_data) {
LYRtap_state.state = cur_dance(state);
switch (LYRtap_state.state) {
case SINGLE_TAP: register_code(KC_PSLS); break;
@ -149,7 +149,7 @@ void LYR_finished (qk_tap_dance_state_t *state, void *user_data) {
}
}
void LYR_reset (qk_tap_dance_state_t *state, void *user_data) {
void LYR_reset (tap_dance_state_t *state, void *user_data) {
switch (LYRtap_state.state) {
case SINGLE_TAP: unregister_code(KC_PSLS); break;
case DOUBLE_TAP: set_single_persistent_default_layer(_GK); break;
@ -164,7 +164,7 @@ static tap LYR75tap_state = {
.state = 0
};
void LYR75_finished (qk_tap_dance_state_t *state, void *user_data) {
void LYR75_finished (tap_dance_state_t *state, void *user_data) {
LYR75tap_state.state = cur_dance(state);
switch (LYR75tap_state.state) {
case SINGLE_TAP: register_code(KC_PSLS); break;
@ -173,7 +173,7 @@ void LYR75_finished (qk_tap_dance_state_t *state, void *user_data) {
}
}
void LYR75_reset (qk_tap_dance_state_t *state, void *user_data) {
void LYR75_reset (tap_dance_state_t *state, void *user_data) {
switch (LYR75tap_state.state) {
case SINGLE_TAP: unregister_code(KC_PSLS); break;
case DOUBLE_TAP: set_single_persistent_default_layer(_GK); break;
@ -188,7 +188,7 @@ static tap LYR50tap_state = {
.state = 0
};
void LYR50_finished (qk_tap_dance_state_t *state, void *user_data) {
void LYR50_finished (tap_dance_state_t *state, void *user_data) {
LYR50tap_state.state = cur_dance(state);
switch (LYR75tap_state.state) {
case SINGLE_TAP: register_code(KC_PSLS); break;
@ -197,7 +197,7 @@ void LYR50_finished (qk_tap_dance_state_t *state, void *user_data) {
}
}
void LYR50_reset (qk_tap_dance_state_t *state, void *user_data) {
void LYR50_reset (tap_dance_state_t *state, void *user_data) {
switch (LYR50tap_state.state) {
case SINGLE_TAP: unregister_code(KC_PSLS); break;
case DOUBLE_TAP: set_single_persistent_default_layer(GK50); break;
@ -212,7 +212,7 @@ static tap BSWtap_state = {
.state = 0
};
void BSW_finished (qk_tap_dance_state_t *state, void *user_data) {
void BSW_finished (tap_dance_state_t *state, void *user_data) {
BSWtap_state.state = cur_dance(state);
switch (BSWtap_state.state) {
case SINGLE_TAP: register_code(KC_ENTER); break;
@ -233,7 +233,7 @@ void BSW_finished (qk_tap_dance_state_t *state, void *user_data) {
}
}
void BSW_reset (qk_tap_dance_state_t *state, void *user_data) {
void BSW_reset (tap_dance_state_t *state, void *user_data) {
switch (BSWtap_state.state) {
case SINGLE_TAP: unregister_code(KC_ENTER); break;
case DOUBLE_TAP:
@ -248,7 +248,7 @@ void BSW_reset (qk_tap_dance_state_t *state, void *user_data) {
//Tap Dance Definitions
//THIS SECTION HAS TO BE AT THE END OF THE TAP DANCE SECTION
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[TD_SFT_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS)
// Other declarations would go here, separated by commas, if you have them
,[TD_Q_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_Q, KC_ESC)

View file

@ -4,7 +4,7 @@
#ifdef TAP_DANCE_ENABLE
//Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[COMM_QUOT] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_QUOT),
[BACKSPACE] = ACTION_TAP_DANCE_DOUBLE (KC_BACKSPACE, LCTL(KC_BACKSPACE)),
[DELETE] = ACTION_TAP_DANCE_DOUBLE (KC_DELETE, LCTL(KC_DELETE))

View file

@ -1,6 +1,6 @@
#include "tap_dances.h"
void td_parenthesis (qk_tap_dance_state_t *state, void *user_data) {
void td_parenthesis (tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
// SEND_STRING ("\(");
tap_code(KC_QUOT);
@ -24,7 +24,7 @@ void td_parenthesis (qk_tap_dance_state_t *state, void *user_data) {
}
}
void safe_reset(qk_tap_dance_state_t *state, void *user_data) {
void safe_reset(tap_dance_state_t *state, void *user_data) {
if (state->count >= 3) {
// Reset the keyboard if you tap the key more than three times
reset_keyboard();
@ -32,7 +32,7 @@ void safe_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_RESET] = ACTION_TAP_DANCE_FN(safe_reset),
[TD_NUM1] = ACTION_TAP_DANCE_DOUBLE(KC_1, KC_4),
[TD_NUM2] = ACTION_TAP_DANCE_DOUBLE(KC_2, KC_5),

View file

@ -23,4 +23,4 @@ enum {
TD_ABR // single double angle brackets
};
#endif // TAP_DANCE_ENABLE
void td_parenthesis (qk_tap_dance_state_t *state, void *user_data);
void td_parenthesis (tap_dance_state_t *state, void *user_data);

View file

@ -1,7 +1,7 @@
#include "tap_dance.h"
#include "lights.h"
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[DA_LCTL] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_lctl_finished,
dance_lctl_reset),
[DA_LSPR] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_lspr_finished,
@ -40,7 +40,7 @@ void layer_switcher_tap(uint8_t new_layer) {
}
}
int cur_dance(qk_tap_dance_state_t *state) {
int cur_dance(tap_dance_state_t *state) {
switch (state->count) {
case 1:
return state->pressed == 0 ? SINGLE_TAP : SINGLE_HOLD;
@ -53,17 +53,17 @@ int cur_dance(qk_tap_dance_state_t *state) {
}
}
void dance_lctl_finished(qk_tap_dance_state_t *state, void *user_data) {
void dance_lctl_finished(tap_dance_state_t *state, void *user_data) {
rbw_led_keys[RBW_LCTL].status = ENABLED;
register_code(KC_LCTL);
};
void dance_lctl_reset(qk_tap_dance_state_t *state, void *user_data) {
void dance_lctl_reset(tap_dance_state_t *state, void *user_data) {
unregister_code(KC_LCTL);
rbw_led_keys[RBW_LCTL].status = DISABLED;
};
void dance_lspr_finished(qk_tap_dance_state_t *state, void *user_data) {
void dance_lspr_finished(tap_dance_state_t *state, void *user_data) {
lsprtap_state.state = cur_dance(state);
switch (lsprtap_state.state) {
@ -77,7 +77,7 @@ void dance_lspr_finished(qk_tap_dance_state_t *state, void *user_data) {
}
};
void dance_lspr_reset(qk_tap_dance_state_t *state, void *user_data) {
void dance_lspr_reset(tap_dance_state_t *state, void *user_data) {
switch (lsprtap_state.state) {
case DOUBLE_HOLD:
unregister_code(KC_LALT);
@ -89,17 +89,17 @@ void dance_lspr_reset(qk_tap_dance_state_t *state, void *user_data) {
}
};
void dance_rctl_finished(qk_tap_dance_state_t *state, void *user_data) {
void dance_rctl_finished(tap_dance_state_t *state, void *user_data) {
rbw_led_keys[RBW_RCTL].status = ENABLED;
register_code(KC_RCTL);
};
void dance_rctl_reset(qk_tap_dance_state_t *state, void *user_data) {
void dance_rctl_reset(tap_dance_state_t *state, void *user_data) {
unregister_code(KC_RCTL);
rbw_led_keys[RBW_RCTL].status = DISABLED;
};
void dance_ralt_finished(qk_tap_dance_state_t *state, void *user_data) {
void dance_ralt_finished(tap_dance_state_t *state, void *user_data) {
ralttap_state.state = cur_dance(state);
switch (ralttap_state.state) {
@ -113,7 +113,7 @@ void dance_ralt_finished(qk_tap_dance_state_t *state, void *user_data) {
}
};
void dance_ralt_reset(qk_tap_dance_state_t *state, void *user_data) {
void dance_ralt_reset(tap_dance_state_t *state, void *user_data) {
switch (ralttap_state.state) {
case DOUBLE_HOLD:
unregister_code(KC_RGUI);
@ -125,7 +125,7 @@ void dance_ralt_reset(qk_tap_dance_state_t *state, void *user_data) {
}
};
void dance_uply_finished(qk_tap_dance_state_t *state, void *user_data) {
void dance_uply_finished(tap_dance_state_t *state, void *user_data) {
upltap_state.state = cur_dance(state);
switch (upltap_state.state) {
@ -145,7 +145,7 @@ void dance_uply_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void dance_uply_reset(qk_tap_dance_state_t *state, void *user_data) {
void dance_uply_reset(tap_dance_state_t *state, void *user_data) {
switch (upltap_state.state) {
case SINGLE_TAP:
break;
@ -157,7 +157,7 @@ void dance_uply_reset(qk_tap_dance_state_t *state, void *user_data) {
upltap_state.state = 0;
}
void dance_dwly_finished(qk_tap_dance_state_t *state, void *user_data) {
void dance_dwly_finished(tap_dance_state_t *state, void *user_data) {
dwltap_state.state = cur_dance(state);
switch (dwltap_state.state) {
@ -188,7 +188,7 @@ void dance_dwly_finished(qk_tap_dance_state_t *state, void *user_data) {
}
}
void dance_dwly_reset(qk_tap_dance_state_t *state, void *user_data) {
void dance_dwly_reset(tap_dance_state_t *state, void *user_data) {
switch (dwltap_state.state) {
case SINGLE_TAP:
break;

View file

@ -32,24 +32,24 @@ enum {
extern volatile uint8_t active_layer;
void layer_switcher_tap(uint8_t);
int cur_dance(qk_tap_dance_state_t *);
int cur_dance(tap_dance_state_t *);
void dance_lctl_finished(qk_tap_dance_state_t *, void *);
void dance_lctl_reset(qk_tap_dance_state_t *, void *);
void dance_lctl_finished(tap_dance_state_t *, void *);
void dance_lctl_reset(tap_dance_state_t *, void *);
void dance_lspr_finished(qk_tap_dance_state_t *, void *);
void dance_lspr_reset(qk_tap_dance_state_t *, void *);
void dance_lspr_finished(tap_dance_state_t *, void *);
void dance_lspr_reset(tap_dance_state_t *, void *);
void dance_rctl_finished(qk_tap_dance_state_t *, void *);
void dance_rctl_reset(qk_tap_dance_state_t *, void *);
void dance_rctl_finished(tap_dance_state_t *, void *);
void dance_rctl_reset(tap_dance_state_t *, void *);
void dance_ralt_finished(qk_tap_dance_state_t *, void *);
void dance_ralt_reset(qk_tap_dance_state_t *, void *);
void dance_ralt_finished(tap_dance_state_t *, void *);
void dance_ralt_reset(tap_dance_state_t *, void *);
void dance_uply_finished(qk_tap_dance_state_t *, void *);
void dance_uply_reset(qk_tap_dance_state_t *, void *);
void dance_uply_finished(tap_dance_state_t *, void *);
void dance_uply_reset(tap_dance_state_t *, void *);
void dance_dwly_finished(qk_tap_dance_state_t *, void *);
void dance_dwly_reset(qk_tap_dance_state_t *, void *);
void dance_dwly_finished(tap_dance_state_t *, void *);
void dance_dwly_reset(tap_dance_state_t *, void *);
#endif

View file

@ -13,7 +13,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "tapdances.h"
void ios_media(qk_tap_dance_state_t *state, void *user_data) {
void ios_media(tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
tap_code(KC_MPLY);
} else if (state->count == 2) {
@ -25,7 +25,7 @@ void ios_media(qk_tap_dance_state_t *state, void *user_data) {
}
}
qk_tap_dance_action_t tap_dance_actions[] = {
tap_dance_action_t tap_dance_actions[] = {
[0] = ACTION_TAP_DANCE_FN(ios_media),
[1] = ACTION_TAP_DANCE_DOUBLE(KC_COMM, KC_SCLN),
[2] = ACTION_TAP_DANCE_DOUBLE(KC_DOT, KC_COLON),

View file

@ -65,14 +65,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
/* Screenshoot */
void dance_SSHT_finished(qk_tap_dance_state_t *state, void *user_data) {
void dance_SSHT_finished(tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
tap_code16(C(S(G(KC_4))));
} else {
tap_code(KC_4);
}
}
void dance_SSHT_reset(qk_tap_dance_state_t *state, void *user_data) {
void dance_SSHT_reset(tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
unregister_code16(C(S(G(KC_4))));
} else {
@ -81,14 +81,14 @@ void dance_SSHT_reset(qk_tap_dance_state_t *state, void *user_data) {
}
/* Å */
void dance_LBRC_finished(qk_tap_dance_state_t *state, void *user_data) {
void dance_LBRC_finished(tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
tap_code16(A(KC_LBRC));
} else {
tap_code(KC_LBRC);
}
}
void dance_LBRC_reset(qk_tap_dance_state_t *state, void *user_data) {
void dance_LBRC_reset(tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
unregister_code16(A(KC_LBRC));
} else {
@ -97,14 +97,14 @@ void dance_LBRC_reset(qk_tap_dance_state_t *state, void *user_data) {
}
/* Ö */
void dance_SCLN_finished(qk_tap_dance_state_t *state, void *user_data) {
void dance_SCLN_finished(tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
tap_code16(A(KC_SCLN));
} else {
tap_code(KC_SCLN);
}
}
void dance_SCLN_reset(qk_tap_dance_state_t *state, void *user_data) {
void dance_SCLN_reset(tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
unregister_code16(A(KC_SCLN));
} else {
@ -113,14 +113,14 @@ void dance_SCLN_reset(qk_tap_dance_state_t *state, void *user_data) {
}
/* Ä */
void dance_QUOT_finished(qk_tap_dance_state_t *state, void *user_data) {
void dance_QUOT_finished(tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
tap_code16(A(KC_QUOT));
} else {
tap_code(KC_QUOT);
}
}
void dance_QUOT_reset(qk_tap_dance_state_t *state, void *user_data) {
void dance_QUOT_reset(tap_dance_state_t *state, void *user_data) {
if (state->count == 2) {
unregister_code16(A(KC_QUOT));
} else {
@ -128,7 +128,7 @@ void dance_QUOT_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[] = {
[SSHT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_SSHT_finished, dance_SSHT_reset),
[LBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LBRC_finished, dance_LBRC_reset),
[SCLN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_SCLN_finished, dance_SCLN_reset),

View file

@ -23,11 +23,11 @@ enum tap_dances {
bool process_record_user(uint16_t keycode, keyrecord_t *record);
void dance_SSHT_finished(qk_tap_dance_state_t *state, void *user_data);
void dance_SSHT_reset(qk_tap_dance_state_t *state, void *user_data);
void dance_LBRC_finished(qk_tap_dance_state_t *state, void *user_data);
void dance_LBRC_reset(qk_tap_dance_state_t *state, void *user_data);
void dance_SCLN_finished(qk_tap_dance_state_t *state, void *user_data);
void dance_SCLN_reset(qk_tap_dance_state_t *state, void *user_data);
void dance_QUOT_finished(qk_tap_dance_state_t *state, void *user_data);
void dance_QUOT_reset(qk_tap_dance_state_t *state, void *user_data);
void dance_SSHT_finished(tap_dance_state_t *state, void *user_data);
void dance_SSHT_reset(tap_dance_state_t *state, void *user_data);
void dance_LBRC_finished(tap_dance_state_t *state, void *user_data);
void dance_LBRC_reset(tap_dance_state_t *state, void *user_data);
void dance_SCLN_finished(tap_dance_state_t *state, void *user_data);
void dance_SCLN_reset(tap_dance_state_t *state, void *user_data);
void dance_QUOT_finished(tap_dance_state_t *state, void *user_data);
void dance_QUOT_reset(tap_dance_state_t *state, void *user_data);