inital corne configuration

This commit is contained in:
Chen Zeng 2024-07-21 11:36:18 +08:00
parent 0dcb541f71
commit 1c11ebe97a

View File

@ -1,11 +1,8 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/ext_power.h>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/outputs.h>
#include <dt-bindings/zmk/rgb.h>
/ {
macros {
flash_macro: flash_macro {
@ -13,6 +10,7 @@
#binding-cells = <0>;
bindings = <&bootloader>;
};
layer_s: layer_s {
label = "layer shift color";
compatible = "zmk,behavior-macro";
@ -39,12 +37,12 @@
tap-ms = <0>;
bindings =
<&macro_press>,
<&lt 1 END>,
<&lt 0 END>,
<&macro_tap>,
<&rgb_ug RGB_COLOR_HSB(300,100,50)>,
<&macro_pause_for_release>,
<&macro_release>,
<&lt 1 END>,
<&lt 0 END>,
<&macro_tap>,
<&rgb_ug RGB_COLOR_HSB(240,50,30)>;
};
@ -57,12 +55,12 @@
tap-ms = <0>;
bindings =
<&macro_press>,
<&mo 2>,
<&mo 0>,
<&macro_tap>,
<&rgb_ug RGB_COLOR_HSB(175,100,50)>,
<&macro_pause_for_release>,
<&macro_release>,
<&mo 2>,
<&mo 0>,
<&macro_tap>,
<&rgb_ug RGB_COLOR_HSB(240,50,30)>;
};
@ -75,76 +73,119 @@
tap-ms = <0>;
bindings =
<&macro_press>,
<&lt 3 DEL>,
<&lt 0 DEL>,
<&macro_tap>,
<&rgb_ug RGB_COLOR_HSB(0,100,50)>,
<&macro_pause_for_release>,
<&macro_release>,
<&lt 3 DEL>,
<&lt 0 DEL>,
<&macro_tap>,
<&rgb_ug RGB_COLOR_HSB(240,50,30)>;
};
};
behaviors {
hm: homerow_mods {
compatible = "zmk,behavior-hold-tap";
label = "HOMEROW_MODS";
bindings = <&kp>, <&kp>;
hm: homerow_mods {
compatible = "zmk,behavior-hold-tap";
label = "HOMEROW_MODS";
bindings = <&kp>, <&kp>;
#binding-cells = <2>;
tapping-term-ms = <200>;
quick-tap-ms = <180>;
flavor = "tap-preferred";
};
ltq: ltq {
compatible = "zmk,behavior-hold-tap";
label = "LTQ";
bindings = <&mo>, <&kp>;
#binding-cells = <2>;
tapping-term-ms = <200>;
quick-tap-ms = <180>;
};
as: auto_shift {
compatible = "zmk,behavior-hold-tap";
label = "AUTO_SHIFT";
bindings = <&kp>, <&kp>;
#binding-cells = <2>;
tapping-term-ms = <135>;
quick-tap-ms = <0>;
};
#binding-cells = <2>;
tapping-term-ms = <200>;
quick-tap-ms = <180>;
flavor = "tap-preferred";
};
ltq: ltq {
compatible = "zmk,behavior-hold-tap";
label = "LTQ";
bindings = <&mo>, <&kp>;
#binding-cells = <2>;
tapping-term-ms = <200>;
quick-tap-ms = <180>;
};
as: auto_shift {
compatible = "zmk,behavior-hold-tap";
label = "AUTO_SHIFT";
bindings = <&kp>, <&kp>;
#binding-cells = <2>;
tapping-term-ms = <135>;
quick-tap-ms = <0>;
};
};
keymap {
compatible = "zmk,keymap";
Qwery {
bindings = <
&rgb_ug RGB_TOG &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp UP_ARROW &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS
&ext_power EP_ON &kp Q &kp W &kp E &kp R &kp T &kp DOWN_ARROW &kp Y &kp U &kp I &kp O &kp P &kp RBKT
&ext_power EP_OFF &kp A &kp S &kp D &kp F &kp G &kp LEFT_ARROW &kp H &kp J &kp K &kp L &kp SEMI &kp APOS
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp RIGHT_ARROW &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp ENTER
&kp BSPC &kp LCTRL &kp LALT &kp LGUI &kp SPACE &kp ENTER &kp ENTER &kp ENTER &kp SPACE &kp RGUI &kp RALT &kp RCTRL
&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp UP_ARROW &kp Y &kp U &kp I &kp O &kp P &kp EQUAL
&kp TAB &kp A &kp S &kp D &kp F &kp G &kp DOWN_ARROW &kp H &kp J &kp K &kp L &kp SEMI &kp APOS
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp LEFT_ARROW &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
&kp BSPC &ltq 3 TAB &ltq 2 SPACE &kp RIGHT_ARROW &ltq 2 SPACE &ltq 3 ENTER &ltq 1 DELETE
&kp C_MUTE &kp ENTER
>;
sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOL_DN>;
display-name = "Qwery";
label = "Qwery";
sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>;
};
Navi {
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 &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans
&trans &trans
>;
};
Number {
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 &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans
&trans &trans
>;
label = "Number";
};
Modify {
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 &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans
&trans &trans
>;
label = "Modify";
};
Flash {
bindings = <
&flash_macro &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 &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
&flash_macro &trans &trans &trans &trans &trans &trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &bt BT_CLR &trans &trans &trans &trans &bt BT_CLR_ALL
&trans &trans &trans &trans &trans &trans &trans
&trans &trans
>;
display-name = "Flash";
label = "Flash";
};
};
conditional_layers {
compatible = "zmk,conditional-layers";
Flash {
if-layers = <3 2>;
then-layer = <4>;
};
};
};