mirror of
https://github.com/Ajetski/corne-zmk-config.git
synced 2025-11-27 11:42:44 -10:00
168 lines
6.2 KiB
Plaintext
168 lines
6.2 KiB
Plaintext
#define ZMK_POINTING_DEFAULT_MOVE_VAL 1200 // 600
|
|
#define ZMK_POINTING_DEFAULT_SCRL_VAL 25 // 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/keys.h>
|
|
#include <dt-bindings/zmk/outputs.h>
|
|
#include <dt-bindings/zmk/pointing.h>
|
|
#include <dt-bindings/zmk/rgb.h>
|
|
|
|
#define BASE 0
|
|
#define SYMBOLS 1
|
|
#define FUNCTION 2
|
|
#define NUMBERS 3
|
|
#define MEDIA 4
|
|
|
|
&mt {
|
|
tapping-term-ms = <300>;
|
|
};
|
|
|
|
&mmv_input_listener { input-processors = <&zip_xy_scaler 2 1>; };
|
|
|
|
&msc_input_listener { input-processors = <&zip_scroll_scaler 2 1>; };
|
|
|
|
&msc {
|
|
acceleration-exponent = <1>; // 0
|
|
time-to-max-speed-ms = <100>; // 300
|
|
delay-ms = <0>; // 0
|
|
};
|
|
|
|
&mmv {
|
|
time-to-max-speed-ms = <500>;
|
|
acceleration-exponent = <1>;
|
|
trigger-period-ms = <16>;
|
|
};
|
|
|
|
&soft_off { hold-time-ms = <3000>; };
|
|
|
|
/ {
|
|
behaviors {
|
|
qt: mod_tap {
|
|
compatible = "zmk,behavior-hold-tap";
|
|
#binding-cells = <2>;
|
|
flavor = "tap-preferred";
|
|
tapping-term-ms = <250>;
|
|
quick-tap-ms = <200>;
|
|
bindings = <&kp>, <&kp>;
|
|
display-name = "Mod-Tap";
|
|
};
|
|
};
|
|
|
|
rgb_encoder: rgb_encoder {
|
|
compatible = "zmk,behavior-sensor-rotate";
|
|
#sensor-binding-cells = <0>;
|
|
bindings = <&rgb_ug RGB_BRI>, <&rgb_ug RGB_BRD>;
|
|
};
|
|
|
|
scroll_encoder: scroll_encoder {
|
|
compatible = "zmk,behavior-sensor-rotate";
|
|
#sensor-binding-cells = <0>;
|
|
bindings = <&msc SCRL_DOWN>, <&msc SCRL_UP>;
|
|
|
|
tap-ms = <100>;
|
|
};
|
|
|
|
combos {
|
|
compatible = "zmk,combos";
|
|
|
|
combo_del {
|
|
timeout-ms = <50>;
|
|
key-positions = <24 25>;
|
|
bindings = <&kp DEL>;
|
|
layers = <0>;
|
|
};
|
|
combo_bksp {
|
|
timeout-ms = <50>;
|
|
key-positions = <23 24>;
|
|
bindings = <&kp BSPC>;
|
|
layers = <0>;
|
|
};
|
|
combo_tab {
|
|
timeout-ms = <50>;
|
|
key-positions = <31 32>;
|
|
bindings = <&kp TAB>;
|
|
layers = <0>;
|
|
};
|
|
combo_ret {
|
|
timeout-ms = <50>;
|
|
key-positions = <37 38>;
|
|
bindings = <&kp RET>;
|
|
layers = <0>;
|
|
};
|
|
|
|
softoff {
|
|
bindings = <&soft_off>;
|
|
key-positions = <1 2 3>;
|
|
layers = <0>;
|
|
};
|
|
};
|
|
|
|
keymap {
|
|
compatible = "zmk,keymap";
|
|
|
|
default_layer {
|
|
display-name = "Base";
|
|
bindings = <
|
|
&kp TAB &kp Q &kp W &kp E &kp R &kp T &mmv MOVE_UP &kp Y &kp U &kp I &kp O &kp P &kp RCMD
|
|
&kp COLON &qt LCTRL A &qt LSHFT S &qt LALT D &qt LCMD F &kp G &mmv MOVE_LEFT &mkp LCLK &mmv MOVE_RIGHT &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 C_MUTE &mmv MOVE_DOWN &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RCTRL
|
|
&mo MEDIA < FUNCTION ESC &kp SPACE &mo SYMBOLS &mo NUMBERS &kp RALT
|
|
>;
|
|
|
|
sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>;
|
|
};
|
|
|
|
|
|
symbol {
|
|
display-name = "Symbols";
|
|
bindings = <
|
|
&none &kp EXCL &kp AT &kp LBRC &kp RBRC &kp PIPE &trans &kp PLUS &kp STAR &kp PRCNT &none &none &none
|
|
&none &kp CARET &kp DLLR &kp LPAR &kp RPAR &kp GRAVE &trans &trans &trans &kp UNDER &kp LBRC &kp RBRC &kp DQT &kp SQT &none
|
|
&none &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp TILDE &trans &trans &kp AMPS &kp LT &kp GT &kp HASH &kp BSLH &none
|
|
&trans &trans &trans &trans &trans &trans
|
|
>;
|
|
|
|
sensor-bindings = <&scroll_encoder>;
|
|
};
|
|
|
|
function {
|
|
display-name = "Fn";
|
|
bindings = <
|
|
&none &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &trans &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &none
|
|
&none &none &none &none &none &kp F10 &trans &trans &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &none &none
|
|
&none &none &none &none &none &kp F11 &none &trans &none &kp PG_DN &kp PG_UP &none &none &none
|
|
&trans &trans &trans &trans &trans &trans
|
|
>;
|
|
|
|
sensor-bindings = <&scroll_encoder>;
|
|
};
|
|
|
|
number {
|
|
display-name = "Nums";
|
|
bindings = <
|
|
&none &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &trans &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &none
|
|
&none &none &none &none &none &none &trans &trans &trans &none &kp N4 &kp N5 &kp N6 &none &none
|
|
&none &none &none &none &none &none &trans &trans &kp N0 &kp N1 &kp N2 &kp N3 &none &none
|
|
&trans &trans &trans &trans &trans &trans
|
|
>;
|
|
|
|
sensor-bindings = <&scroll_encoder>;
|
|
};
|
|
|
|
media {
|
|
display-name = "Media";
|
|
bindings = <
|
|
&rgb_ug RGB_BRI &rgb_ug RGB_SAI &rgb_ug RGB_HUI &rgb_ug RGB_EFF &rgb_ug RGB_SPI &rgb_ug RGB_TOG &trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_CLR
|
|
&rgb_ug RGB_BRD &rgb_ug RGB_SAD &rgb_ug RGB_HUD &rgb_ug RGB_EFR &rgb_ug RGB_SPD &none &trans &trans &trans &kp C_PP &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &none &out OUT_TOG
|
|
&none &none &none &none &none &none &trans &trans &kp CAPS &kp C_BRI_DN &kp C_BRI_UP &kp C_BKLT_TOG &kp C_PIP &none
|
|
&trans &trans &trans &trans &trans &trans
|
|
>;
|
|
|
|
sensor-bindings = <&rgb_encoder>;
|
|
};
|
|
};
|
|
};
|