diff options
Diffstat (limited to 'qmk/keyboards/sofle_choc/keymaps/custom/quad_tapdance.c')
| -rw-r--r-- | qmk/keyboards/sofle_choc/keymaps/custom/quad_tapdance.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/qmk/keyboards/sofle_choc/keymaps/custom/quad_tapdance.c b/qmk/keyboards/sofle_choc/keymaps/custom/quad_tapdance.c index 2b01fe9..3efce7c 100644 --- a/qmk/keyboards/sofle_choc/keymaps/custom/quad_tapdance.c +++ b/qmk/keyboards/sofle_choc/keymaps/custom/quad_tapdance.c @@ -27,9 +27,7 @@ */ #include QMK_KEYBOARD_H -#include "keymap_bepo.h" #include "quad_tapdance.h" -#include "keycodes.h" td_state_t cur_dance(tap_dance_state_t *state) { if (state->count == 1) { @@ -54,38 +52,3 @@ td_state_t cur_dance(tap_dance_state_t *state) { else return TD_DOUBLE_TAP; } else return TD_UNKNOWN; } - -// -// Definition for the layer key -// -// The only one usage is to activate the layer over the keyboard, but there is -// two way of doing it: -// -// The first mode, when hold, is to activate the layer as long as the key is -// pressed. -// The second one is to switch in the layer mode when tapped, in this mode, -// you can go back into the normal layer by a single press on the key. -// -static td_tap_t ql_tap_state = { - .state = TD_NONE -}; - -// Functions that control what our tap dance key does -void ql_finished(tap_dance_state_t *state, void *user_data) { - ql_tap_state.state = cur_dance(state); - switch (ql_tap_state.state) { - // Remove the layer with a single tap, this way I always have a key to - // remove the the layer, without knowing the previous state I had. - case TD_SINGLE_TAP: layer_invert(LAYER_SYMBOLS); break; - case TD_SINGLE_HOLD: layer_on(LAYER_SYMBOLS); break; - default: break; - } -} - -void ql_reset(tap_dance_state_t *state, void *user_data) { - // If the key was held down and now is released then switch off the layer - if (ql_tap_state.state == TD_SINGLE_HOLD) { - layer_clear(); - } - ql_tap_state.state = TD_NONE; -} |
