diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2024-02-01 21:08:03 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2024-02-01 21:08:03 +0100 |
commit | 42f8740cd3b5d2ff57997c2c7cea28a4313fe0ed (patch) | |
tree | 3f329efbf26289b938597c423bab986363dcf3f6 /qmk/keyboards | |
parent | 42698c7c8b53cbfa92d4466a17c3dd52131855fe (diff) |
QMK: Updated the tapdance mode for the lshift key
Diffstat (limited to 'qmk/keyboards')
-rw-r--r-- | qmk/keyboards/sofle_choc/keymaps/custom/quad_tapdance.c | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/qmk/keyboards/sofle_choc/keymaps/custom/quad_tapdance.c b/qmk/keyboards/sofle_choc/keymaps/custom/quad_tapdance.c index 19b1e46..bd160d2 100644 --- a/qmk/keyboards/sofle_choc/keymaps/custom/quad_tapdance.c +++ b/qmk/keyboards/sofle_choc/keymaps/custom/quad_tapdance.c @@ -132,15 +132,10 @@ void ql_reset(tap_dance_state_t *state, void *user_data) { } // -// Definiton for the key DEL. +// Definiton for the key L_SHIFT. // The main usage of the key is to activate the LShift when hold. But the key -// can also be used to send the DEL keycode. +// can also be used to active the CAPSLOCK mode. // -// As I do not want to send the DEL keycode by mistake, I’ve configured the key -// to do it on double-tap. If you hold the key after a double tap, the DELETE -// code will be repeated again until the key is released. -// -// On a single press, the key will just remove the CAPSLOCK state if active. // static td_tap_t lshift_tap_state = { .is_press_action = true, @@ -153,13 +148,11 @@ void lshift_finished(tap_dance_state_t *state, void *user_data) { switch (lshift_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_HOLD: register_code(KC_LEFT_SHIFT); break; - case TD_DOUBLE_TAP: - case TD_DOUBLE_HOLD: - register_code(KC_DELETE); break; + case TD_SINGLE_HOLD: + register_code(KC_LEFT_SHIFT); + break; case TD_SINGLE_TAP: - if (host_keyboard_led_state().caps_lock) - register_code(KC_CAPS_LOCK); + register_code(KC_CAPS_LOCK); break; default: break; } @@ -167,13 +160,11 @@ void lshift_finished(tap_dance_state_t *state, void *user_data) { void lshift_reset(tap_dance_state_t *state, void *user_data) { switch (lshift_tap_state.state) { - case TD_SINGLE_HOLD: unregister_code(KC_LEFT_SHIFT); break; - case TD_DOUBLE_TAP: - case TD_DOUBLE_HOLD: - unregister_code(KC_DELETE); break; + case TD_SINGLE_HOLD: + unregister_code(KC_LEFT_SHIFT); + break; case TD_SINGLE_TAP: - if (host_keyboard_led_state().caps_lock) - unregister_code(KC_CAPS_LOCK); + unregister_code(KC_CAPS_LOCK); break; default: break; } |