Tap Dance: remove qk_
prefix (#19313)
This commit is contained in:
@@ -33,11 +33,11 @@ enum {
|
||||
};
|
||||
|
||||
//function to handle all the tap dances
|
||||
int cur_dance(qk_tap_dance_state_t *state);
|
||||
int cur_dance(tap_dance_state_t *state);
|
||||
|
||||
//functions for each tap dance
|
||||
void tk_finished(qk_tap_dance_state_t *state, void *user_data);
|
||||
void tk_reset(qk_tap_dance_state_t *state, void *user_data);
|
||||
void tk_finished(tap_dance_state_t *state, void *user_data);
|
||||
void tk_reset(tap_dance_state_t *state, void *user_data);
|
||||
|
||||
#define INDICATOR_LED B5
|
||||
|
||||
@@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
};
|
||||
|
||||
//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 a tap was registered
|
||||
if(!state->pressed){
|
||||
@@ -88,7 +88,7 @@ static tap tk_tap_state = {
|
||||
};
|
||||
|
||||
//functions that control what our tap dance key does
|
||||
void tk_finished(qk_tap_dance_state_t *state, void *user_data){
|
||||
void tk_finished(tap_dance_state_t *state, void *user_data){
|
||||
tk_tap_state.state = cur_dance(state);
|
||||
switch(tk_tap_state.state){
|
||||
case SINGLE_TAP:
|
||||
@@ -116,7 +116,7 @@ void tk_finished(qk_tap_dance_state_t *state, void *user_data){
|
||||
}
|
||||
}
|
||||
|
||||
void tk_reset(qk_tap_dance_state_t *state, void *user_data){
|
||||
void tk_reset(tap_dance_state_t *state, void *user_data){
|
||||
//if held and released, leave the layer
|
||||
if(tk_tap_state.state == SINGLE_HOLD){
|
||||
layer_off(_FN0);
|
||||
@@ -126,6 +126,6 @@ void tk_reset(qk_tap_dance_state_t *state, void *user_data){
|
||||
}
|
||||
|
||||
//associate the tap dance key with its functionality
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
tap_dance_action_t tap_dance_actions[] = {
|
||||
[TAPPY_KEY] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tk_finished, tk_reset)
|
||||
};
|
||||
|
@@ -67,11 +67,11 @@ enum custom_keycodes { // git macros
|
||||
};
|
||||
|
||||
//function to handle all the tap dances
|
||||
int cur_dance(qk_tap_dance_state_t *state);
|
||||
int cur_dance(tap_dance_state_t *state);
|
||||
|
||||
//functions for each tap dance
|
||||
void tk_finished(qk_tap_dance_state_t *state, void *user_data);
|
||||
void tk_reset(qk_tap_dance_state_t *state, void *user_data);
|
||||
void tk_finished(tap_dance_state_t *state, void *user_data);
|
||||
void tk_reset(tap_dance_state_t *state, void *user_data);
|
||||
|
||||
// define the macros in here
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
@@ -167,7 +167,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
};
|
||||
|
||||
//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 a tap was registered
|
||||
@@ -203,7 +203,7 @@ static tap tk_tap_state = {
|
||||
};
|
||||
|
||||
//functions that control what our tap dance key does
|
||||
void tk_finished(qk_tap_dance_state_t *state, void *user_data){
|
||||
void tk_finished(tap_dance_state_t *state, void *user_data){
|
||||
tk_tap_state.state = cur_dance(state);
|
||||
uint8_t val = rgblight_get_val();
|
||||
switch(tk_tap_state.state){
|
||||
@@ -246,7 +246,7 @@ void tk_finished(qk_tap_dance_state_t *state, void *user_data){
|
||||
}
|
||||
}
|
||||
|
||||
void tk_reset(qk_tap_dance_state_t *state, void *user_data){
|
||||
void tk_reset(tap_dance_state_t *state, void *user_data){
|
||||
//if held and released, leave the layer
|
||||
if(tk_tap_state.state == SINGLE_HOLD){
|
||||
layer_off(_GI4);
|
||||
@@ -258,6 +258,6 @@ void tk_reset(qk_tap_dance_state_t *state, void *user_data){
|
||||
}
|
||||
|
||||
//associate the tap dance key with its functionality
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
tap_dance_action_t tap_dance_actions[] = {
|
||||
[TAPPY_KEY] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tk_finished, tk_reset)
|
||||
};
|
||||
|
@@ -34,11 +34,11 @@ enum {
|
||||
};
|
||||
|
||||
//function to handle all the tap dances
|
||||
int cur_dance(qk_tap_dance_state_t *state);
|
||||
int cur_dance(tap_dance_state_t *state);
|
||||
|
||||
//functions for each tap dance
|
||||
void tk_finished(qk_tap_dance_state_t *state, void *user_data);
|
||||
void tk_reset(qk_tap_dance_state_t *state, void *user_data);
|
||||
void tk_finished(tap_dance_state_t *state, void *user_data);
|
||||
void tk_reset(tap_dance_state_t *state, void *user_data);
|
||||
|
||||
#define INDICATOR_LED B5
|
||||
#define TX_LED D5
|
||||
@@ -85,7 +85,7 @@ void matrix_init_user(void) {
|
||||
}
|
||||
|
||||
//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 a tap was registered
|
||||
if(!state->pressed){
|
||||
@@ -114,7 +114,7 @@ static tap tk_tap_state = {
|
||||
};
|
||||
|
||||
//functions that control what our tap dance key does
|
||||
void tk_finished(qk_tap_dance_state_t *state, void *user_data){
|
||||
void tk_finished(tap_dance_state_t *state, void *user_data){
|
||||
tk_tap_state.state = cur_dance(state);
|
||||
switch(tk_tap_state.state){
|
||||
case SINGLE_TAP:
|
||||
@@ -166,7 +166,7 @@ void tk_finished(qk_tap_dance_state_t *state, void *user_data){
|
||||
}
|
||||
}
|
||||
|
||||
void tk_reset(qk_tap_dance_state_t *state, void *user_data){
|
||||
void tk_reset(tap_dance_state_t *state, void *user_data){
|
||||
//if held and released, leave the layer
|
||||
if(tk_tap_state.state == SINGLE_HOLD){
|
||||
layer_off(_FN0);
|
||||
@@ -177,6 +177,6 @@ void tk_reset(qk_tap_dance_state_t *state, void *user_data){
|
||||
|
||||
|
||||
//associate the tap dance key with its functionality
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
tap_dance_action_t tap_dance_actions[] = {
|
||||
[TAPPY_KEY] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tk_finished, tk_reset)
|
||||
};
|
||||
|
@@ -89,6 +89,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
),
|
||||
};
|
||||
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
tap_dance_action_t tap_dance_actions[] = {
|
||||
[TD_PLAY_DO_NOT_DISTURB] = ACTION_TAP_DANCE_DOUBLE(KC_MPLY, KC_F6)
|
||||
};
|
@@ -30,7 +30,7 @@ enum tapdance {
|
||||
TD_APP_CAPS_LOCK,
|
||||
};
|
||||
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
tap_dance_action_t tap_dance_actions[] = {
|
||||
[TD_SINGLE_QUOTE_DOUBLE_QUOTES] = ACTION_TAP_DANCE_DOUBLE(KC_QUOT, KC_DQUO),
|
||||
[TD_APP_CAPS_LOCK] = ACTION_TAP_DANCE_DOUBLE(KC_APP, KC_CAPS),
|
||||
};
|
||||
|
Reference in New Issue
Block a user