271 lines
10 KiB
Plaintext
271 lines
10 KiB
Plaintext
#define ZMK_POINTING_DEFAULT_MOVE_VAL 400 // 600
|
|
#define ZMK_POINTING_DEFAULT_SCRL_VAL 10 // 10
|
|
|
|
#include <input/processors.dtsi>
|
|
#include <zephyr/dt-bindings/input/input-event-codes.h>
|
|
#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/pointing.h>
|
|
#include <dt-bindings/zmk/rgb.h>
|
|
|
|
&mmv_input_listener { input-processors = <&zip_xy_scaler 2 1>; };
|
|
|
|
&msc_input_listener { input-processors = <&zip_scroll_scaler 2 1>; };
|
|
|
|
&msc {
|
|
acceleration-exponent = <0>; // 0
|
|
time-to-max-speed-ms = <500>; // 300 // 0
|
|
};
|
|
|
|
&mmv {
|
|
time-to-max-speed-ms = <700>;
|
|
acceleration-exponent = <2>;
|
|
trigger-period-ms = <16>;
|
|
};
|
|
|
|
/ {
|
|
scroll_encoder: scroll_encoder {
|
|
compatible = "zmk,behavior-sensor-rotate";
|
|
#sensor-binding-cells = <0>;
|
|
bindings = <&msc SCRL_DOWN>, <&msc SCRL_UP>;
|
|
|
|
tap-ms = <100>;
|
|
};
|
|
|
|
win_load: win_load {
|
|
compatible = "zmk,behavior-tap-dance";
|
|
label = "WIN_LOAD";
|
|
#binding-cells = <0>;
|
|
bindings = <&trans>, <&win>;
|
|
};
|
|
|
|
copy_paste: copy_paste {
|
|
compatible = "zmk,behavior-tap-dance";
|
|
label = "COPY_PASTE";
|
|
#binding-cells = <0>;
|
|
bindings = <©>, <&paste>;
|
|
};
|
|
|
|
behaviors {
|
|
};
|
|
|
|
combos {
|
|
compatible = "zmk,combos";
|
|
|
|
equal {
|
|
bindings = <&kp EQUAL>;
|
|
key-positions = <21 22>;
|
|
layers = <0>;
|
|
};
|
|
|
|
cl_bracket {
|
|
bindings = <&kp RIGHT_BRACKET>;
|
|
key-positions = <34 35>;
|
|
layers = <0>;
|
|
};
|
|
|
|
minus {
|
|
bindings = <&kp MINUS>;
|
|
key-positions = <16 17>;
|
|
layers = <0>;
|
|
};
|
|
|
|
op_bracket {
|
|
bindings = <&kp LEFT_BRACKET>;
|
|
key-positions = <29 30>;
|
|
layers = <0>;
|
|
};
|
|
|
|
settings {
|
|
bindings = <&rgb_to_layer 4 RGB_COLOR_HSB_VAL(64,100,50)>;
|
|
key-positions = <53 54 55>;
|
|
};
|
|
|
|
set_l {
|
|
bindings = <&rgb_to_layer 4 RGB_COLOR_HSB_VAL(64,100,50)>;
|
|
key-positions = <61 62 63>;
|
|
};
|
|
|
|
gaming_mode {
|
|
bindings = <&rgb_to_layer 3 RGB_COLOR_HSB_VAL(312,74,51)>;
|
|
key-positions = <27 28 29 30>;
|
|
};
|
|
};
|
|
|
|
macros {
|
|
rgb_mo_layer: rgb_layer {
|
|
compatible = "zmk,behavior-macro-two-param";
|
|
#binding-cells = <2>;
|
|
bindings =
|
|
<¯o_tap>,
|
|
<&rgb_ug RGB_ON ¯o_param_1to1>,
|
|
<¯o_press>,
|
|
<&mo MACRO_PLACEHOLDER ¯o_param_2to2>,
|
|
<¯o_tap>,
|
|
<&rgb_ug RGB_COLOR_HSB_CMD MACRO_PLACEHOLDER>,
|
|
<¯o_pause_for_release>,
|
|
<¯o_param_1to1>,
|
|
<¯o_release>,
|
|
<&mo MACRO_PLACEHOLDER>,
|
|
<¯o_tap>,
|
|
<&rgb_ug RGB_OFF>;
|
|
|
|
label = "RGB_LAYER";
|
|
wait-ms = <0>;
|
|
tap-ms = <0>;
|
|
};
|
|
|
|
win: win {
|
|
compatible = "zmk,behavior-macro";
|
|
#binding-cells = <0>;
|
|
bindings =
|
|
<¯o_press>,
|
|
<&kp LEFT_GUI>,
|
|
<¯o_tap>,
|
|
<&kp ENTER>,
|
|
<¯o_wait_time 1000>,
|
|
<¯o_release>,
|
|
<&kp LGUI>,
|
|
<¯o_wait_time 100>,
|
|
<¯o_tap>,
|
|
<&kp W &kp I &kp N &kp RET>,
|
|
<¯o_press>;
|
|
|
|
label = "WIN";
|
|
};
|
|
|
|
rgb_to_layer: rgb_to_layer {
|
|
compatible = "zmk,behavior-macro-two-param";
|
|
#binding-cells = <2>;
|
|
bindings =
|
|
<¯o_param_1to1 &to MACRO_PLACEHOLDER>,
|
|
<¯o_tap>,
|
|
<&rgb_ug RGB_ON ¯o_param_2to2 &rgb_ug RGB_COLOR_HSB_CMD MACRO_PLACEHOLDER>;
|
|
|
|
label = "RGB_TO_LAYER";
|
|
wait-ms = <0>;
|
|
tap-ms = <0>;
|
|
};
|
|
|
|
off_to_layer: off_to_layer {
|
|
compatible = "zmk,behavior-macro-one-param";
|
|
#binding-cells = <1>;
|
|
bindings =
|
|
<¯o_param_1to1 &to MACRO_PLACEHOLDER>,
|
|
<¯o_tap>,
|
|
<&rgb_ug RGB_OFF>;
|
|
|
|
label = "OFF_TO_LAYER";
|
|
wait-ms = <0>;
|
|
tap-ms = <0>;
|
|
};
|
|
|
|
rgb_toggle: rgb_toggle {
|
|
compatible = "zmk,behavior-macro";
|
|
#binding-cells = <0>;
|
|
bindings = <&rgb_ug RGB_COLOR_HSB(341,100,61) &rgb_ug RGB_TOG>;
|
|
label = "RGB_TOGGLE";
|
|
};
|
|
|
|
copy: copy {
|
|
compatible = "zmk,behavior-macro";
|
|
#binding-cells = <0>;
|
|
bindings =
|
|
<¯o_press>,
|
|
<&kp RCTRL>,
|
|
<¯o_tap>,
|
|
<&kp C>,
|
|
<¯o_release>,
|
|
<&kp RCTRL>;
|
|
|
|
label = "COPY";
|
|
};
|
|
|
|
paste: paste {
|
|
compatible = "zmk,behavior-macro";
|
|
#binding-cells = <0>;
|
|
bindings =
|
|
<¯o_press>,
|
|
<&kp RCTRL>,
|
|
<¯o_tap>,
|
|
<&kp V>,
|
|
<¯o_release>,
|
|
<&kp RCTRL>;
|
|
|
|
label = "PASTE";
|
|
};
|
|
};
|
|
|
|
keymap {
|
|
compatible = "zmk,keymap";
|
|
|
|
Main {
|
|
bindings = <
|
|
&mt GRAVE ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp UP &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BACKSPACE
|
|
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp DOWN &kp Y &kp U &kp I &kp O &kp P &kp BSLH
|
|
©_paste &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
|
|
&mt LSHFT ENTER &kp Z &kp X &kp C &kp V &kp B &kp RIGHT_ARROW &kp N &kp M &kp COMMA &kp DOT &kp FSLH &mt RSHIFT ENTER
|
|
&kp C_MUTE &mo 1 &kp RALT &mo 2 &mt RCTRL SPACE &kp LEFT_GUI &rgb_toggle &kp RGUI &mt RALT SPACE &mo 1 &kp RCTRL &mo 2
|
|
>;
|
|
|
|
sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOL_DN>;
|
|
display-name = "Main";
|
|
label = "Main";
|
|
};
|
|
|
|
LHelp {
|
|
bindings = <
|
|
&trans &mt F11 F1 &mt F12 F2 &kp F3 &kp F4 &kp F5 &trans &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp DEL
|
|
&trans &none &none &kp UP &none &kp MINUS &trans &kp EQUAL &mkp MB1 &mmv MOVE_UP &mkp MB2 &msc SCRL_DOWN &none
|
|
&trans &none &kp LEFT &kp DOWN &kp RIGHT &kp LEFT_BRACKET &trans &kp RIGHT_BRACKET &mmv MOVE_LEFT &mmv MOVE_DOWN &mmv MOVE_RIGHT &mkp MB3 &none
|
|
&trans &none &kp C_PREV &kp C_PP &kp C_NEXT &none &trans &none &none &none &none &msc SCRL_UP &none
|
|
&to 0 &none &trans &to 2 &trans &trans &to 0 &trans &trans &none &trans &to 2
|
|
>;
|
|
|
|
display-name = "LHelp";
|
|
sensor-bindings = <&inc_dec_kp C_BRI_INC C_BRI_DEC>;
|
|
};
|
|
|
|
RHelp {
|
|
bindings = <
|
|
&trans &mt F11 F1 &mt F12 F2 &kp F3 &kp F4 &kp F5 &trans &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp DEL
|
|
&trans &msc SCRL_DOWN &mkp MB1 &mmv MOVE_UP &mkp MB2 &kp MINUS &trans &kp EQUAL &none &kp UP &none &none &none
|
|
&trans &mkp MB3 &mmv MOVE_LEFT &mmv MOVE_DOWN &mmv MOVE_RIGHT &kp LEFT_BRACKET &trans &kp RIGHT_BRACKET &kp LEFT &kp DOWN &kp RIGHT &none &none
|
|
&trans &msc SCRL_UP &none &none &none &none &trans &none &kp C_PREV &kp C_PP &kp C_NEXT &none &none
|
|
&to 0 &to 1 &trans &none &trans &trans &to 0 &trans &trans &to 1 &trans &none
|
|
>;
|
|
|
|
label = "RHelp";
|
|
sensor-bindings = <&inc_dec_kp C_BRI_INC C_BRI_DEC>;
|
|
};
|
|
|
|
Gaming {
|
|
bindings = <
|
|
&kp ESC &kp NUMBER_1 &kp NUMBER_2 &kp NUMBER_3 &kp NUMBER_4 &kp NUMBER_5 &kp C_BRI_INC &kp NUMBER_6 &kp NUMBER_7 &kp NUMBER_8 &kp NUMBER_9 &kp NUMBER_0 &none
|
|
&mkp MB4 &kp TAB &kp Q &kp W &kp E &kp R &kp C_BRI_DEC &none &mkp MB1 &mmv MOVE_UP &mkp MB2 &none &none
|
|
&mkp MB5 &kp LEFT_SHIFT &kp A &kp S &kp D &kp F &rgb_ug RGB_BRD &mkp MB4 &mmv MOVE_LEFT &mmv MOVE_DOWN &mmv MOVE_RIGHT &mkp MB5 &none
|
|
&kp H &kp LCTRL &kp Z &kp X &kp C &kp V &rgb_ug RGB_BRI &none &none &none &none &none &none
|
|
&off_to_layer 0 &kp J &kp I &kp M &kp SPACE &kp ENTER &kp C_PP &mkp MB3 &kp SPACE &none &none &none
|
|
>;
|
|
|
|
label = "Gaming";
|
|
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
|
};
|
|
|
|
Settings {
|
|
bindings = <
|
|
&off_to_layer 0 &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 &off_to_layer 0
|
|
&bt BT_CLR &bt BT_CLR_ALL &trans &trans &trans &trans &trans &rgb_ug RGB_HUD &rgb_ug RGB_HUI &trans &trans &trans &trans
|
|
&out OUT_TOG &ext_power EP_TOG &trans &trans &trans &trans &trans &rgb_ug RGB_SAD &rgb_ug RGB_SAI &trans &trans &trans &trans
|
|
&bootloader &sys_reset &rgb_ug RGB_TOG &rgb_ug RGB_EFF &rgb_ug RGB_SPD &rgb_ug RGB_SPI &trans &rgb_ug RGB_BRD &rgb_ug RGB_BRI &trans &trans &trans &trans
|
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
|
>;
|
|
|
|
label = "Settings";
|
|
};
|
|
};
|
|
};
|