358 lines
14 KiB
Plaintext
358 lines
14 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 = <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>;
|
|
};
|
|
|
|
copy_paste: copy_paste {
|
|
compatible = "zmk,behavior-tap-dance";
|
|
label = "COPY_PASTE";
|
|
#binding-cells = <0>;
|
|
bindings = <©>, <&paste>;
|
|
};
|
|
|
|
copy_on_ht: copy_on_ht {
|
|
compatible = "zmk,behavior-hold-tap";
|
|
label = "COPY_ON_HT";
|
|
bindings = <©>, <&kp>;
|
|
|
|
#binding-cells = <2>;
|
|
tapping-term-ms = <200>;
|
|
flavor = "tap-preferred";
|
|
};
|
|
|
|
paste_on_ht: paste_on_ht {
|
|
compatible = "zmk,behavior-hold-tap";
|
|
label = "PASTE_ON_HT";
|
|
bindings = <&paste>, <&kp>;
|
|
|
|
#binding-cells = <2>;
|
|
tapping-term-ms = <200>;
|
|
flavor = "tap-preferred";
|
|
};
|
|
|
|
home_row_mod_left: home_row_mod_left {
|
|
compatible = "zmk,behavior-hold-tap";
|
|
label = "HOME_ROW_MOD_LEFT";
|
|
bindings = <&kp>, <&kp>;
|
|
|
|
#binding-cells = <2>;
|
|
hold-trigger-on-release;
|
|
flavor = "balanced";
|
|
require-prior-idle-ms = <150>;
|
|
quick-tap-ms = <175>;
|
|
tapping-term-ms = <280>;
|
|
hold-trigger-key-positions = <7 8 9 10 11 12 20 21 22 23 24 25 33 34 35 36 37 38 46 47 48 49 50 51>;
|
|
};
|
|
|
|
home_row_mod_right: home_row_mod_right {
|
|
compatible = "zmk,behavior-hold-tap";
|
|
label = "HOME_ROW_MOD_RIGHT";
|
|
bindings = <&kp>, <&kp>;
|
|
|
|
#binding-cells = <2>;
|
|
hold-trigger-on-release;
|
|
flavor = "balanced";
|
|
require-prior-idle-ms = <150>;
|
|
quick-tap-ms = <175>;
|
|
tapping-term-ms = <280>;
|
|
hold-trigger-key-positions = <0 1 2 4 5 13 14 15 16 17 18 26 27 28 29 30 31 39 40 41 42 43 44 3>;
|
|
};
|
|
|
|
paste_ht_new: paste_ht_new {
|
|
compatible = "zmk,behavior-hold-tap";
|
|
label = "PASTE_HT_NEW";
|
|
bindings = <&paste>, <&kp>;
|
|
|
|
#binding-cells = <2>;
|
|
flavor = "balanced";
|
|
require-prior-idle-ms = <150>;
|
|
quick-tap-ms = <175>;
|
|
tapping-term-ms = <280>;
|
|
};
|
|
|
|
copy_ht_new: copy_ht_new {
|
|
compatible = "zmk,behavior-hold-tap";
|
|
label = "COPY_HT_NEW";
|
|
bindings = <©>, <&kp>;
|
|
|
|
#binding-cells = <2>;
|
|
flavor = "balanced";
|
|
require-prior-idle-ms = <150>;
|
|
quick-tap-ms = <175>;
|
|
tapping-term-ms = <280>;
|
|
};
|
|
|
|
behaviors {
|
|
};
|
|
|
|
combos {
|
|
compatible = "zmk,combos";
|
|
|
|
bracket_open {
|
|
bindings = <&kp LEFT_BRACKET>;
|
|
key-positions = <16 17>;
|
|
layers = <0>;
|
|
};
|
|
|
|
equal {
|
|
bindings = <&kp EQUAL>;
|
|
key-positions = <34 35>;
|
|
layers = <0>;
|
|
};
|
|
|
|
minus {
|
|
bindings = <&kp MINUS>;
|
|
key-positions = <29 30>;
|
|
layers = <0>;
|
|
};
|
|
|
|
settings {
|
|
bindings = <&rgb_to_layer 4 RGB_COLOR_HSB_VAL(64,100,50)>;
|
|
key-positions = <53 54 55>;
|
|
layers = <0>;
|
|
};
|
|
|
|
set_l {
|
|
bindings = <&rgb_to_layer 4 RGB_COLOR_HSB_VAL(64,100,50)>;
|
|
key-positions = <61 62 63>;
|
|
layers = <0>;
|
|
};
|
|
|
|
gaming_mode {
|
|
bindings = <&rgb_to_layer 3 RGB_COLOR_HSB_VAL(312,74,51)>;
|
|
key-positions = <27 28 29 30>;
|
|
layers = <0>;
|
|
};
|
|
|
|
bracket_close {
|
|
bindings = <&kp RIGHT_BRACKET>;
|
|
key-positions = <21 22>;
|
|
layers = <0>;
|
|
};
|
|
|
|
lpar {
|
|
bindings = <&kp LEFT_PARENTHESIS>;
|
|
key-positions = <43 42>;
|
|
layers = <0>;
|
|
};
|
|
|
|
rpar {
|
|
bindings = <&kp RIGHT_PARENTHESIS>;
|
|
key-positions = <48 47>;
|
|
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_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
|
|
&mt RIGHT_BRACKET LEFT_BRACKET &kp Q &kp W &kp E &kp R &kp T &kp DOWN &kp Y &kp U &kp I &kp O &kp P &kp BSLH
|
|
&mt TAB TAB &home_row_mod_left LSHFT A &home_row_mod_left RIGHT_ALT S &home_row_mod_left RCTRL D &home_row_mod_left LEFT_WIN F &kp G &kp LEFT_ARROW &kp H &home_row_mod_right RIGHT_WIN J &home_row_mod_right RCTRL K &home_row_mod_right RIGHT_ALT L &home_row_mod_right RSHFT SEMI &mt BACKSPACE 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 &none &kp RALT &mo 2 < 1 SPACE ©_ht_new 0 ENTER &rgb_toggle &paste_ht_new 0 ENTER < 2 SPACE &mo 1 &kp RALT &none
|
|
>;
|
|
|
|
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 &none &trans &trans &to 0 &trans &trans &none &trans &none
|
|
>;
|
|
|
|
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 &none &trans &none &trans &trans &to 0 &trans &trans &none &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 &kp T &none &kp UP_ARROW &none &none &none
|
|
&mkp MB5 &kp LEFT_SHIFT &kp A &kp S &kp D &kp F &rgb_ug RGB_BRD &kp G &kp LEFT_ARROW &kp DOWN_ARROW &kp RIGHT_ARROW &kp L &none
|
|
&kp H &kp LCTRL &kp Z &kp X &kp C &kp V &rgb_ug RGB_BRI &kp B &kp C_PREV &kp C_PP &kp C_NEXT &none &none
|
|
&off_to_layer 0 &kp J &kp I &kp M &kp SPACE &kp ENTER &rgb_ug RGB_TOG &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";
|
|
};
|
|
};
|
|
};
|