diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2023-12-19 21:44:34 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2023-12-27 22:04:09 +0100 |
commit | cd92946f492bf13e09c6a5e6d24dcc4bbc523e6a (patch) | |
tree | b6ee6a4e024f20639b1a596208fded58895d0919 /qmk/keyboards/sofle_choc/keymaps/custom/quad_tapdance.h | |
parent | 3cafccbde7acf7ae10ff8c4fbd38c6d075982fc6 (diff) |
Added the qmk firmware for sofle keyboard
Diffstat (limited to 'qmk/keyboards/sofle_choc/keymaps/custom/quad_tapdance.h')
-rw-r--r-- | qmk/keyboards/sofle_choc/keymaps/custom/quad_tapdance.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/qmk/keyboards/sofle_choc/keymaps/custom/quad_tapdance.h b/qmk/keyboards/sofle_choc/keymaps/custom/quad_tapdance.h new file mode 100644 index 0000000..87da433 --- /dev/null +++ b/qmk/keyboards/sofle_choc/keymaps/custom/quad_tapdance.h @@ -0,0 +1,30 @@ +#pragma once + +typedef enum { + TD_NONE, + TD_UNKNOWN, + TD_SINGLE_TAP, + TD_SINGLE_HOLD, + TD_DOUBLE_TAP, + TD_DOUBLE_HOLD, + TD_DOUBLE_SINGLE_TAP, // Send two single taps + TD_TRIPLE_TAP, + TD_TRIPLE_HOLD +} td_state_t; + +typedef struct { + bool is_press_action; + td_state_t state; +} td_tap_t; + +td_state_t cur_dance(tap_dance_state_t *state); + +// For the x tap dance. Put it here so it can be used in any keymap +void w_finished(tap_dance_state_t *state, void *user_data); +void w_reset(tap_dance_state_t *state, void *user_data); + +void ql_finished(tap_dance_state_t *state, void *user_data); +void ql_reset(tap_dance_state_t *state, void *user_data); + +void lshift_finished(tap_dance_state_t *state, void *user_data); +void lshift_reset(tap_dance_state_t *state, void *user_data); |