mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-21 15:12:02 +00:00
format
This commit is contained in:
parent
14eab13c19
commit
b9e9fd057a
@ -43,9 +43,9 @@ tap_dance_state_t *tap_dance_get_state(uint8_t tap_dance_idx) {
|
|||||||
// Search for the first available state
|
// Search for the first available state
|
||||||
for (i = 0; i < TAP_DANCE_MAX_SIMULTANEOUS; i++) {
|
for (i = 0; i < TAP_DANCE_MAX_SIMULTANEOUS; i++) {
|
||||||
if (!tap_dance_states[i].in_use) {
|
if (!tap_dance_states[i].in_use) {
|
||||||
tap_dance_states[i].tap_dance_idx = tap_dance_idx;
|
tap_dance_states[i].tap_dance_idx = tap_dance_idx;
|
||||||
tap_dance_states[i].state_idx = i;
|
tap_dance_states[i].state_idx = i;
|
||||||
tap_dance_states[i].in_use = true;
|
tap_dance_states[i].in_use = true;
|
||||||
return &tap_dance_states[i];
|
return &tap_dance_states[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -233,7 +233,7 @@ void tap_dance_task(void) {
|
|||||||
if (!active_td || timer_elapsed(last_tap_time) <= GET_TAPPING_TERM(active_td, &(keyrecord_t){})) return;
|
if (!active_td || timer_elapsed(last_tap_time) <= GET_TAPPING_TERM(active_td, &(keyrecord_t){})) return;
|
||||||
|
|
||||||
memcpy_P(&action, tap_dance_get(QK_TAP_DANCE_GET_INDEX(active_td)), sizeof(tap_dance_action_t));
|
memcpy_P(&action, tap_dance_get(QK_TAP_DANCE_GET_INDEX(active_td)), sizeof(tap_dance_action_t));
|
||||||
state = tap_dance_get_state(QK_TAP_DANCE_GET_INDEX(active_td));
|
state = tap_dance_get_state(QK_TAP_DANCE_GET_INDEX(active_td));
|
||||||
if (state != NULL && !state->interrupted) {
|
if (state != NULL && !state->interrupted) {
|
||||||
process_tap_dance_action_on_dance_finished(&action, state);
|
process_tap_dance_action_on_dance_finished(&action, state);
|
||||||
}
|
}
|
||||||
|
@ -67,10 +67,10 @@ typedef struct {
|
|||||||
{ .fn = {tap_dance_pair_on_each_tap, tap_dance_pair_finished, tap_dance_pair_reset, NULL}, .user_data = (void *)&(pair), }
|
{ .fn = {tap_dance_pair_on_each_tap, tap_dance_pair_finished, tap_dance_pair_reset, NULL}, .user_data = (void *)&(pair), }
|
||||||
|
|
||||||
#define DUAL_ROLE_TAP_DANCE_LAYER_MOVE(kc, layer) \
|
#define DUAL_ROLE_TAP_DANCE_LAYER_MOVE(kc, layer) \
|
||||||
{kc, layer, layer_move}
|
{ kc, layer, layer_move }
|
||||||
|
|
||||||
#define DUAL_ROLE_TAP_DANCE_LAYER_TOGGLE(kc, layer) \
|
#define DUAL_ROLE_TAP_DANCE_LAYER_TOGGLE(kc, layer) \
|
||||||
{kc, layer, layer_invert}
|
{ kc, layer, layer_invert }
|
||||||
|
|
||||||
#define ACTION_TAP_DANCE_DUAL_ROLE(dual_role) \
|
#define ACTION_TAP_DANCE_DUAL_ROLE(dual_role) \
|
||||||
{ .fn = {tap_dance_dual_role_on_each_tap, tap_dance_dual_role_finished, tap_dance_dual_role_reset, NULL}, .user_data = (void *)&(dual_role), }
|
{ .fn = {tap_dance_dual_role_on_each_tap, tap_dance_dual_role_finished, tap_dance_dual_role_reset, NULL}, .user_data = (void *)&(dual_role), }
|
||||||
|
Loading…
Reference in New Issue
Block a user