22 lines
431 B
C
22 lines
431 B
C
|
#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;
|
||
|
}
|