221 lines
9.9 KiB
Plaintext
221 lines
9.9 KiB
Plaintext
#define ZMK_POINTING_DEFAULT_MOVE_VAL 600 // 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 = <500>;
|
|
acceleration-exponent = <1>;
|
|
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>;
|
|
};
|
|
|
|
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 = <1 2 3 4 8 9 10 11>;
|
|
};
|
|
|
|
switch_to_help {
|
|
bindings = <&rgb_to_layer 1 RGB_COLOR_HSB_VAL(0,0,99)>;
|
|
key-positions = <55 61>;
|
|
layers = <0>;
|
|
};
|
|
};
|
|
|
|
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_release>,
|
|
<&kp LGUI>,
|
|
<¯o_tap>,
|
|
<&kp W &kp I &kp N &kp RET>;
|
|
|
|
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>;
|
|
};
|
|
};
|
|
|
|
keymap {
|
|
compatible = "zmk,keymap";
|
|
|
|
Main {
|
|
bindings = <
|
|
&mt GRAVE ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &mmv MOVE_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 &mmv MOVE_DOWN &kp Y &kp U &kp I &kp O &kp P &kp BSLH
|
|
&kp CAPS &kp A &kp S &kp D &kp F &kp G &mmv MOVE_LEFT &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 &mmv MOVE_RIGHT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &mt RSHIFT ENTER
|
|
&kp C_MUTE &kp LCTRL &kp LEFT_ALT &rgb_mo_layer 1 RGB_COLOR_HSB_VAL(179,46,95) &kp SPACE &kp LEFT_GUI &mkp LCLK &kp RGUI &kp SPACE &rgb_mo_layer 1 RGB_COLOR_HSB_VAL(0,3,96) &kp RIGHT_ALT &kp RCTRL
|
|
>;
|
|
|
|
sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOL_DN>;
|
|
display-name = "Main";
|
|
label = "Main";
|
|
};
|
|
|
|
Help {
|
|
bindings = <
|
|
&off_to_layer 0 &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
|
|
&msc SCRL_UP &kp C_VOLUME_DOWN &kp C_PREVIOUS &kp UP &kp C_NEXT &kp C_VOLUME_UP &trans &trans &mkp MB1 &mmv MOVE_UP &mkp MB2 &kp PG_UP &msc SCRL_UP
|
|
&msc SCRL_DOWN &trans &kp LEFT &kp DOWN &kp RIGHT &rgb_to_layer 3 RGB_COLOR_HSB_VAL(321,100,50) &trans &trans &mmv MOVE_LEFT &mmv MOVE_DOWN &mmv MOVE_RIGHT &trans &mkp MB3
|
|
&trans &trans &trans &rgb_to_layer 2 RGB_COLOR_HSB_VAL(177,98,31) &trans &win_load &trans &trans &trans &rgb_to_layer 2 RGB_COLOR_HSB_VAL(183,100,26) &trans &kp PG_DN &msc SCRL_DOWN
|
|
&kp C_PLAY_PAUSE &trans &trans &none &trans &trans &trans &trans &trans &none &trans &trans
|
|
>;
|
|
|
|
display-name = "Help";
|
|
sensor-bindings = <&inc_dec_kp C_BRI_INC C_BRI_DEC>;
|
|
};
|
|
|
|
Cursor {
|
|
bindings = <
|
|
&off_to_layer 0 &kp NUMBER_1 &kp NUMBER_2 &kp NUMBER_3 &kp NUMBER_4 &kp NUMBER_5 &trans &kp NUMBER_6 &kp NUMBER_7 &kp NUMBER_8 &kp NUMBER_9 &kp NUMBER_0 &off_to_layer 0
|
|
&msc SCRL_UP &trans &mkp MB1 &mmv MOVE_UP &mkp MB2 &trans &trans &trans &trans &trans &trans &trans &trans
|
|
&mkp MB3 &trans &mmv MOVE_LEFT &mmv MOVE_DOWN &mmv MOVE_RIGHT &trans &trans &trans &trans &trans &trans &trans &trans
|
|
&msc SCRL_DOWN &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 = "Cursor";
|
|
};
|
|
|
|
Gaming {
|
|
bindings = <
|
|
&kp ESC &kp NUMBER_1 &kp NUMBER_2 &kp NUMBER_3 &kp NUMBER_4 &kp NUMBER_5 &none &none &none &none &none &none &none
|
|
&kp U &kp TAB &kp Q &kp W &kp E &kp R &none &none &mkp MB1 &mmv MOVE_UP &mkp MB2 &none &none
|
|
&kp I &kp LEFT_SHIFT &kp A &kp S &kp D &kp F &none &mkp MB4 &mmv MOVE_LEFT &mmv MOVE_DOWN &mmv MOVE_RIGHT &mkp MB5 &none
|
|
&kp O &kp LCTRL &kp Z &kp X &kp C &kp V &none &none &none &none &none &none &none
|
|
&off_to_layer 0 &kp J &kp K &kp L &kp SPACE &kp ENTER &none &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";
|
|
};
|
|
};
|
|
};
|