2022-02-06 19:47:50 -08:00
|
|
|
#include "keymap.h"
|
|
|
|
#include "tapdance.h"
|
|
|
|
|
|
|
|
uint8_t dance_step(qk_tap_dance_state_t *state) {
|
|
|
|
if (state->count == 1) {
|
|
|
|
if (state->interrupted || !state->pressed) {
|
|
|
|
return SINGLE_TAP;
|
|
|
|
} else {
|
|
|
|
return SINGLE_HOLD;
|
|
|
|
}
|
|
|
|
} else if (state->count == 2) {
|
|
|
|
if (state->interrupted) {
|
|
|
|
return DOUBLE_SINGLE_TAP;
|
|
|
|
} else if (state->pressed) {
|
|
|
|
return DOUBLE_HOLD;
|
|
|
|
} else {
|
|
|
|
return DOUBLE_TAP;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return MORE_TAPS;
|
|
|
|
}
|
2022-07-19 08:45:18 -07:00
|
|
|
|
|
|
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
|
|
|
[TD_WMLAYOUT] = ACTION_TAP_DANCE_FN_ADVANCED(td_wmlayout_dance, td_wmlayout_finished, td_wmlayout_reset),
|
|
|
|
};
|