diff --git a/config/base.keymap b/config/base.keymap index 9996feb..9b30ea3 100644 --- a/config/base.keymap +++ b/config/base.keymap @@ -5,6 +5,7 @@ #define ___ &trans #define DSK_PREV &kp LG(LC(LEFT)) #define DSK_NEXT &kp LG(LC(RIGHT)) +#define DUMMY &kp K_CANCEL // cancels caps_word and does nothing else #define DEF 0 #define NAV 1 @@ -69,6 +70,20 @@ TODOs and ISSUES #binding-cells = <0>; bindings = <&kp LG(X) &kp U &kp S>; }; + + // Make sticky shift cancel capsword. Alternatively: mod-morph ss_cw into DUMMY + // to cancel capsword with triggering sticky-shift when capsword is active. + ss_cancel: ss_cancel { + wait-ms = <0>; + tap-ms = <1>; + compatible = "zmk,behavior-macro"; + label = "STICKY_SHIFT_CANCEL_CAPSWORD"; + #binding-cells = <0>; + bindings = <¯o_tap DUMMY> // cancel caps_word; + , <¯o_press &sk LSHFT> // then tap sticky-shift and hold + , <¯o_pause_for_release> // until key release to enable + , <¯o_release &sk LSHFT>; // holding shift + }; }; behaviors { @@ -117,13 +132,13 @@ TODOs and ISSUES masked_mods = ; // requires PR #1114 }; - // tap: sticky shift | double tap: capsword + // tap: sticky shift | double tap: capsword | triple tap: cancel capsword ss_cw: sticky_shift_capsword { compatible = "zmk,behavior-tap-dance"; label = "STICKY_SHIFT_CAPSWORD"; #binding-cells = <0>; tapping-term-ms = <200>; - bindings = <&sk LSHFT>, <&caps_word>, <&none>; + bindings = <&ss_cancel>, <&caps_word>, ; }; };