Tap Dance: remove qk_
prefix (#19313)
This commit is contained in:
parent
83e8e5845a
commit
1978007fae
298 changed files with 1327 additions and 1327 deletions
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue