diff --git a/config/boards/shields/xiao_flex_v2/xiao_flex_v2_right.overlay b/config/boards/shields/xiao_flex_v2/xiao_flex_v2_right.overlay index bdb04f9..eca0be3 100644 --- a/config/boards/shields/xiao_flex_v2/xiao_flex_v2_right.overlay +++ b/config/boards/shields/xiao_flex_v2/xiao_flex_v2_right.overlay @@ -56,6 +56,7 @@ spi-max-frequency = <2000000>; irq-gpios = <&gpio0 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; scroll-layers = <4>; + snipe-layers = <1>; }; }; diff --git a/config/west.yml b/config/west.yml index 1390ea2..81cb4ec 100644 --- a/config/west.yml +++ b/config/west.yml @@ -14,3 +14,4 @@ manifest: revision: main self: path: config + diff --git a/config/xiao_flex_v2.keymap b/config/xiao_flex_v2.keymap index 608616e..fae7127 100644 --- a/config/xiao_flex_v2.keymap +++ b/config/xiao_flex_v2.keymap @@ -6,51 +6,131 @@ #include #include +#include #include #include +#include #include -#include +#include +#include +#include / { + behaviors { + bmr: right_balanced_homerow_mods { + compatible = "zmk,behavior-hold-tap"; + #binding-cells = <2>; + tapping-term-ms = <200>; + quick-tap-ms = <125>; + require-prior-idle-ms = <150>; + flavor = "balanced"; + bindings = <&kp>, <&kp>; + + hold-trigger-key-positions = <0 1 2 3 4 5 12 13 14 15 16 17 24 25 26 27 28 29 36 37>; + hold-trigger-on-release; + }; + + bml: left_balanced_homerow_mods { + compatible = "zmk,behavior-hold-tap"; + #binding-cells = <2>; + tapping-term-ms = <200>; + quick-tap-ms = <125>; + require-prior-idle-ms = <150>; + flavor = "balanced"; + bindings = <&kp>, <&kp>; + + hold-trigger-key-positions = <6 7 8 9 10 11 18 19 20 21 22 23 30 31 32 33 34 35 38 39 40>; + hold-trigger-on-release; + }; + + mscrl: mscrl { + compatible = "zmk,behavior-sensor-rotate"; + label = "MSCRL"; + #sensor-binding-cells = <0>; + bindings = <&msc MOVE_Y(40)>, <&msc MOVE_Y(-40)>; + + tap-ms = <100>; + }; + }; + keymap { compatible = "zmk,keymap"; default_layer { bindings = < -&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT -&kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT -&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT - &kp UP &kp DOWN &kp X &kp LEFT &kp RIGHT - &kp LGUI &kp SPACE &kp DEL &kp BSPC &kp ENTER &kp LGUI - &kp LCTRL &kp LALT &mo 1 +&kp LC(W) &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LG(L) +&kp RC(LG(LEFT)) &bml LWIN A &bml LALT S &bml LCTRL D &bml LSHFT F &kp G &kp H &bmr LSHFT J &bmr LCTRL K &bmr LALT L &bmr LWIN SEMI &kp RC(LG(RIGHT_ARROW)) +&none &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp QUESTION &kp SQT + &kp HOME &kp PAGE_DOWN &kp LA(LEFT) &kp PAGE_UP &kp END + &kp ESCAPE < 1 TAB < 2 ENTER < 3 DEL < 4 BACKSPACE < 5 SPACE + &mkp RCLK &mkp LCLK &mkp MB3 >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + sensor-bindings = <&mscrl>; }; layer_1 { bindings = < -&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &mkp LCLK &mkp RCLK &kp N7 &kp N8 &kp N9 &kp BSPC -&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &trans &kp FSLH &kp N4 &kp N5 &kp N6 &kp MINUS -&kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &kp TAB &kp N1 &kp N2 &kp N3 &kp PLUS - &trans &trans &trans &trans &trans - &trans &trans &trans &trans &trans &trans - &trans &bootloader &trans +&none &none &none &none &none &none &kp SLASH &kp N7 &kp N8 &kp N9 &kp MINUS &none +&none &kp LWIN &kp LALT &kp LCTRL &kp LSHFT &none &kp LESS_THAN &kp N4 &kp N5 &kp N6 &kp PLUS &none +&none &none &none &none &none &none &kp GREATER_THAN &kp N1 &kp N2 &kp N3 &trans &none + &trans &trans &trans &kp N0 &kp EQUAL + &trans &trans &trans &trans &trans &trans + &trans &trans &trans >; - sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; + sensor-bindings = <&mscrl>; }; layer_2 { bindings = < -&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans -&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans -&trans &trans &trans &trans &trans &trans &trans &trans &kp UP &trans &trans &trans - &trans &trans &trans &trans &trans - &trans &trans &kp LEFT &kp DOWN &kp RIGHT &trans +&none &none &none &none &none &none &none &none &kp UP &none &none &none +&none &kp LWIN &kp LALT &kp LCTRL &kp LSHFT &none &kp CAPS &kp LEFT &kp DOWN &kp RIGHT &none &none +&none &none &none &none &none &none &none &none &none &none &none &none + &kp HOME &kp PG_DN &trans &kp PG_UP &kp END + &trans &trans &trans &trans &trans &trans + &trans &trans &trans + >; + + sensor-bindings = <&mscrl>; + }; + + layer_3 { + bindings = < +&none &kp F12 &kp F7 &kp F8 &kp F9 &none &none &none &none &none &none &none +&none &kp F11 &kp F4 &kp F3 &kp F2 &none &none &kp LSHFT &kp LCTRL &kp LALT &kp LWIN &none +&none &kp F10 &kp F6 &kp F5 &kp F1 &none &none &none &none &none &none &none + &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans >; + sensor-bindings = <&mscrl>; + }; + + layer_4 { + bindings = < +&kp GRAVE &kp LEFT_BRACE &kp AMPS &kp STAR &kp RIGHT_BRACE &kp TILDE &kp GRAVE &none &none &none &none &none +&kp CARET &kp LPAR &kp HASH &kp EXCL &kp RPAR &kp PRCNT &kp LESS_THAN &kp LSHFT &kp LCTRL &kp LALT &kp LWIN &none +&kp PIPE &kp LBKT &kp DOLLAR &kp AT &kp RBKT &kp BACKSLASH &kp GREATER_THAN &none &none &none &none &none + &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans + &trans &trans &trans + >; + + sensor-bindings = <&mscrl>; + }; + + layer_5 { + bindings = < +&bootloader &none &none &none &none &none &none &none &none &none &none &bootloader +&none &kp K_PREV &kp K_VOL_UP &kp K_VOL_DN &kp K_NEXT &ext_power EP_TOG &none &kp LSHFT &kp LCTRL &kp LALT &kp LWIN &none +&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &out OUT_TOG &none &none &none &none &none &none + &trans &trans &trans &trans &trans + &kp K_STOP &kp K_PP &kp K_MUTE &trans &trans &trans + &trans &trans &trans + >; + sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>; }; };