Make sticky shift cancel capsword

This commit is contained in:
urob 2022-06-28 23:19:33 -04:00
parent 55da63cb2f
commit 0ea43b1f84

View file

@ -5,6 +5,7 @@
#define ___ &trans #define ___ &trans
#define DSK_PREV &kp LG(LC(LEFT)) #define DSK_PREV &kp LG(LC(LEFT))
#define DSK_NEXT &kp LG(LC(RIGHT)) #define DSK_NEXT &kp LG(LC(RIGHT))
#define DUMMY &kp K_CANCEL // cancels caps_word and does nothing else
#define DEF 0 #define DEF 0
#define NAV 1 #define NAV 1
@ -69,6 +70,20 @@ TODOs and ISSUES
#binding-cells = <0>; #binding-cells = <0>;
bindings = <&kp LG(X) &kp U &kp S>; 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 = <&macro_tap DUMMY> // cancel caps_word;
, <&macro_press &sk LSHFT> // then tap sticky-shift and hold
, <&macro_pause_for_release> // until key release to enable
, <&macro_release &sk LSHFT>; // holding shift
};
}; };
behaviors { behaviors {
@ -117,13 +132,13 @@ TODOs and ISSUES
masked_mods = <MOD_LSFT>; // requires PR #1114 masked_mods = <MOD_LSFT>; // requires PR #1114
}; };
// tap: sticky shift | double tap: capsword // tap: sticky shift | double tap: capsword | triple tap: cancel capsword
ss_cw: sticky_shift_capsword { ss_cw: sticky_shift_capsword {
compatible = "zmk,behavior-tap-dance"; compatible = "zmk,behavior-tap-dance";
label = "STICKY_SHIFT_CAPSWORD"; label = "STICKY_SHIFT_CAPSWORD";
#binding-cells = <0>; #binding-cells = <0>;
tapping-term-ms = <200>; tapping-term-ms = <200>;
bindings = <&sk LSHFT>, <&caps_word>, <&none>; bindings = <&ss_cancel>, <&caps_word>, <DUMMY>;
}; };
}; };