328 lines
12 KiB
Text
328 lines
12 KiB
Text
/*
|
|
* Copyright (c) 2023 The ZMK Contributors
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#include <behaviors.dtsi>
|
|
#include <dt-bindings/zmk/keys.h>
|
|
#include <dt-bindings/zmk/rgb.h>
|
|
|
|
&led_strip {
|
|
// chain-length = <6>;
|
|
|
|
chain-length = <31>; // Uncomment if using both per-key and underglow LEDs
|
|
// chain-length = <25>; // Uncomment if using only per-key LEDs.
|
|
};
|
|
|
|
/ {
|
|
macros {
|
|
sym_sec: sym_sec {
|
|
compatible = "zmk,behavior-macro";
|
|
#binding-cells = <0>;
|
|
bindings = <&kp SLCK &kp S &kp O>;
|
|
label = "sym_sec";
|
|
};
|
|
|
|
de_ue: de_ue {
|
|
compatible = "zmk,behavior-macro";
|
|
#binding-cells = <0>;
|
|
bindings = <&kp SLCK &kp U &kp DQT>;
|
|
label = "DE_UE";
|
|
};
|
|
|
|
de_ae: de_ae {
|
|
compatible = "zmk,behavior-macro";
|
|
#binding-cells = <0>;
|
|
bindings = <&kp SLCK &kp A &kp DQT>;
|
|
label = "DE_AE";
|
|
};
|
|
|
|
de_oe: de_oe {
|
|
compatible = "zmk,behavior-macro";
|
|
#binding-cells = <0>;
|
|
bindings = <&kp SLCK &kp O &kp DQT>;
|
|
label = "DE_OE";
|
|
};
|
|
|
|
de_ss: de_ss {
|
|
compatible = "zmk,behavior-macro";
|
|
#binding-cells = <0>;
|
|
bindings = <&kp SLCK &kp S &kp S>;
|
|
label = "DE_SS";
|
|
};
|
|
|
|
sym_eur: sym_eur {
|
|
compatible = "zmk,behavior-macro";
|
|
#binding-cells = <0>;
|
|
bindings = <&kp SLCK &kp C &kp EQUAL>;
|
|
label = "SYM_EUR";
|
|
};
|
|
|
|
sym_ss1: sym_ss1 {
|
|
compatible = "zmk,behavior-macro";
|
|
#binding-cells = <0>;
|
|
bindings = <&kp SLCK &kp CARET &kp KP_NUMBER_1>;
|
|
label = "SYM_SS1";
|
|
};
|
|
|
|
sym_ss2: sym_ss2 {
|
|
compatible = "zmk,behavior-macro";
|
|
#binding-cells = <0>;
|
|
bindings = <&kp SLCK &kp CARET &kp KP_NUMBER_2>;
|
|
label = "SYM_SS2";
|
|
};
|
|
|
|
sym_ss3: sym_ss3 {
|
|
compatible = "zmk,behavior-macro";
|
|
#binding-cells = <0>;
|
|
bindings = <&kp SLCK &kp CARET &kp KP_NUMBER_3>;
|
|
label = "SYM_SS3";
|
|
};
|
|
|
|
sym_tm: sym_tm {
|
|
compatible = "zmk,behavior-macro";
|
|
#binding-cells = <0>;
|
|
bindings = <&kp SLCK &kp T &kp M>;
|
|
label = "SYM_TM";
|
|
};
|
|
|
|
sym_reg: sym_reg {
|
|
compatible = "zmk,behavior-macro";
|
|
#binding-cells = <0>;
|
|
bindings = <&kp SLCK &kp O &kp R>;
|
|
label = "SYM_REG";
|
|
};
|
|
|
|
sym_copy: sym_copy {
|
|
compatible = "zmk,behavior-macro";
|
|
#binding-cells = <0>;
|
|
bindings = <&kp SLCK &kp O &kp C>;
|
|
label = "SYM_COPY";
|
|
};
|
|
|
|
sym_deg: sym_deg {
|
|
compatible = "zmk,behavior-macro";
|
|
#binding-cells = <0>;
|
|
bindings = <&kp SLCK &kp O &kp O>;
|
|
label = "SYM_DEG";
|
|
};
|
|
|
|
sym_mu: sym_mu {
|
|
compatible = "zmk,behavior-macro";
|
|
#binding-cells = <0>;
|
|
bindings = <&kp SLCK &kp M &kp U>;
|
|
label = "SYM_MU";
|
|
};
|
|
|
|
sym_acute: sym_acute {
|
|
compatible = "zmk,behavior-macro";
|
|
#binding-cells = <0>;
|
|
bindings = <&kp SLCK &kp SQT &kp SQT>;
|
|
label = "SYM_ACUTE";
|
|
};
|
|
};
|
|
|
|
behaviors {
|
|
de_hash: de_hash {
|
|
compatible = "zmk,behavior-mod-morph";
|
|
label = "DE_HASH";
|
|
bindings = <&kp HASH>, <&kp SQT>;
|
|
|
|
#binding-cells = <0>;
|
|
mods = <(MOD_LSFT)>;
|
|
};
|
|
|
|
de_comma: de_comma {
|
|
compatible = "zmk,behavior-mod-morph";
|
|
label = "DE_COMMA";
|
|
bindings = <&kp COMMA>, <&kp SEMICOLON>;
|
|
|
|
#binding-cells = <0>;
|
|
mods = <(MOD_LSFT)>;
|
|
};
|
|
|
|
de_dot: de_dot {
|
|
compatible = "zmk,behavior-mod-morph";
|
|
label = "DE_DOT";
|
|
bindings = <&kp DOT>, <&kp COLON>;
|
|
|
|
#binding-cells = <0>;
|
|
mods = <(MOD_LSFT)>;
|
|
};
|
|
|
|
part_less_pipe: part_less_pipe {
|
|
compatible = "zmk,behavior-mod-morph";
|
|
label = "PART_LESS_PIPE";
|
|
bindings = <&kp LESS_THAN>, <&kp PIPE>;
|
|
|
|
#binding-cells = <0>;
|
|
mods = <(MOD_RALT)>;
|
|
};
|
|
|
|
de_lt_mt_pipe: de_lt_mt_pipe {
|
|
compatible = "zmk,behavior-mod-morph";
|
|
label = "de_lt_mt_pipe";
|
|
bindings = <&part_less_pipe>, <&kp GREATER_THAN>;
|
|
|
|
#binding-cells = <0>;
|
|
mods = <(MOD_LSFT)>;
|
|
};
|
|
|
|
de_car_deg: de_car_deg {
|
|
compatible = "zmk,behavior-mod-morph";
|
|
label = "de_car_deg";
|
|
bindings = <&kp CARET>, <&sym_deg>;
|
|
|
|
#binding-cells = <0>;
|
|
mods = <(MOD_LSFT)>;
|
|
};
|
|
|
|
part_plus_tilde: part_plus_tilde {
|
|
compatible = "zmk,behavior-mod-morph";
|
|
label = "PART_PLUS_TILDE";
|
|
bindings = <&kp PLUS>, <&kp TILDE>;
|
|
|
|
#binding-cells = <0>;
|
|
mods = <(MOD_RALT)>;
|
|
};
|
|
|
|
de_plus_str_tld: de_plus_str_tld {
|
|
compatible = "zmk,behavior-mod-morph";
|
|
label = "de_plus_str_tld";
|
|
bindings = <&part_plus_tilde>, <&kp STAR>;
|
|
|
|
#binding-cells = <0>;
|
|
mods = <(MOD_RALT)>;
|
|
};
|
|
|
|
dv_qmark_ss: dv_qmark_ss {
|
|
compatible = "zmk,behavior-mod-morph";
|
|
label = "dv_qmark_ss";
|
|
bindings = <&kp QMARK>, <&de_ss>;
|
|
|
|
#binding-cells = <0>;
|
|
mods = <(MOD_LSFT)>;
|
|
};
|
|
|
|
de_acute_grave: de_acute_grave {
|
|
compatible = "zmk,behavior-mod-morph";
|
|
label = "DE_ACUTE_GRAVE";
|
|
bindings = <&sym_acute>, <&kp GRAVE>;
|
|
|
|
#binding-cells = <0>;
|
|
mods = <(MOD_LSFT)>;
|
|
};
|
|
|
|
dv_slash: dv_slash {
|
|
compatible = "zmk,behavior-mod-morph";
|
|
label = "DV_SLASH";
|
|
bindings = <&kp SLASH>, <&kp NON_US_BACKSLASH>;
|
|
|
|
#binding-cells = <0>;
|
|
mods = <(MOD_LSFT)>;
|
|
};
|
|
|
|
mouse_move_x: mouse_move_x {
|
|
compatible = "zmk,behavior-sensor-rotate-var";
|
|
#sensor-binding-cells = <0>;
|
|
bindings = <&mmv MOVE_RIGHT>, <&mmv MOVE_LEFT>;
|
|
|
|
tap-ms = <100>;
|
|
};
|
|
|
|
mouse_move_y: mouse_move_y {
|
|
compatible = "zmk,behavior-sensor-rotate-var";
|
|
#sensor-binding-cells = <0>;
|
|
bindings = <&mmv MOVE_UP>, <&mmv MOVE_DOWN>;
|
|
|
|
tap-ms = <100>;
|
|
};
|
|
};
|
|
|
|
combos {
|
|
compatible = "zmk,combos";
|
|
|
|
function_layer_combo {
|
|
bindings = <&mo 3>;
|
|
key-positions = <41 48>;
|
|
};
|
|
|
|
number_layer_combo {
|
|
bindings = <&mo 5>;
|
|
key-positions = <42 48>;
|
|
};
|
|
};
|
|
|
|
keymap {
|
|
compatible = "zmk,keymap";
|
|
|
|
base_quertz-de {
|
|
// ---------------------------------------------------------------------------------------------------------------------------------
|
|
// | ESC | Q | W | E | R | T | | Y | U | I | O | P | \ |
|
|
// | TAB | A | S | D | F | G | | H | J | K | L | ; | ' |
|
|
// | SHIFT | Z | X | C | V | B | L SHIFT | L SHIFT | | LAYER 1 | L SHIFT | N | M | , | . | / | CTRL |
|
|
// | GUI | DEL | RET | SPACE | ESC | | RET | SPACE | TAB | BSPC | R-ALT |
|
|
|
|
bindings = <
|
|
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Z &kp U &kp I &kp O &kp P &de_ue
|
|
&kp ESC &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &de_oe &de_ae
|
|
&kp LCTRL &kp Y &kp X &kp C &kp V &kp B &trans &trans &trans &trans &kp N &kp M &de_comma &de_dot &kp MINUS &de_hash
|
|
&none &mo 2 &kp LSHFT &trans &trans &trans &trans &kp SPACE &mo 4 &none
|
|
>;
|
|
|
|
sensor-bindings = <&mouse_move_x>, <&mouse_move_y>;
|
|
};
|
|
|
|
base_colemak-dh {
|
|
bindings = <
|
|
&kp TAB &kp Q &kp W &kp F &kp P &kp B &kp J &kp L &kp U &kp Y &de_hash &trans
|
|
&kp ESC &kp A &kp R &kp S &kp T &kp G &kp M &kp N &kp E &kp I &kp O &trans
|
|
&trans &kp Z &kp X &kp C &kp D &kp V &rgb_ug RGB_COLOR_HSB(175,100,50) &rgb_ug RGB_EFR &rgb_ug RGB_BRD &rgb_ug RGB_BRI &kp K &kp H &de_comma &de_dot &kp MINUS &trans
|
|
&none &mo 2 &kp LSHFT &kp ENTER &rgb_ug RGB_EFF &rgb_ug RGB_TOG &kp BSPC &kp SPACE &mo 4 &none
|
|
>;
|
|
};
|
|
|
|
extend_layer {
|
|
bindings = <
|
|
&trans &kp ESC &kp K_BACK &kp K_FIND &kp K_FORWARD &kp INS &kp HOME &kp PG_UP &kp UP &kp PG_DN &kp CAPS &trans
|
|
&trans &sk LALT &sk LGUI &sk LSHFT &sk LCTRL &sk RALT &kp END &kp LEFT &kp DOWN &kp RIGHT &kp DEL &trans
|
|
&trans &kp LC(Z) &kp LC(X) &kp LC(C) &kp LGUI &kp LC(V) &trans &trans &trans &trans &kp ENTER &kp BSPC &kp TAB &kp C_MENU &kp PSCRN &trans
|
|
&none &none &trans &trans &trans &trans &trans &kp ENTER &mo 3 &none
|
|
>;
|
|
};
|
|
|
|
function_layer {
|
|
// ---------------------------------------------------------------------------------------------------------------------------------
|
|
// | | |BT_CLR|BTSEL0|BTSEL1|BTSEL2| | | | | | | |
|
|
// | | | |BTSEL3|BTSEL4| | | | | | | | |
|
|
// | | | | | | | | | | | | | | | | | | |
|
|
// | | | | | | | | | | | | |
|
|
|
|
bindings = <
|
|
&trans &kp K_STOP &kp K_PREV &kp K_PLAY_PAUSE &kp K_NEXT &kp C_BRIGHTNESS_INC &kp F12 &kp F7 &kp F8 &kp F9 &kp SLCK &trans
|
|
&trans &sk LALT &sk LGUI &sk LSHFT &sk LCTRL &kp C_BRI_DEC &kp F11 &kp F4 &kp F5 &kp F6 &to 0 &trans
|
|
&trans &kp K_MUTE &kp C_VOL_DN &kp LC(LS(C)) &kp C_VOL_UP &kp LC(LS(V)) &trans &trans &trans &trans &kp F10 &kp F1 &kp F2 &kp F3 &to 1 &trans
|
|
&none &trans &trans &trans &trans &trans &trans &kp ENTER &trans &none
|
|
>;
|
|
};
|
|
|
|
symbol_layer {
|
|
bindings = <
|
|
&trans &kp EXCL &kp AT &kp POUND &kp DOLLAR &kp PERCENT &kp EQUAL &kp GRAVE &kp COLON &kp SEMICOLON &kp PLUS &trans
|
|
&trans &sk LALT &sk LGUI &sk LSHFT &sk LCTRL &kp CARET &kp STAR &kp LEFT_PARENTHESIS &kp LBRC &kp LBKT &kp MINUS &trans
|
|
&trans &trans &trans &kp BSLH &kp PIPE &kp AMPERSAND &trans &trans &trans &trans &kp TILDE &kp RIGHT_PARENTHESIS &kp RBRC &kp RBKT &kp UNDER &trans
|
|
&none &mo 3 &mo 5 &trans &trans &trans &trans &trans &none &none
|
|
>;
|
|
};
|
|
|
|
number_layer {
|
|
bindings = <
|
|
&trans &trans &trans &trans &trans &kp LNLCK &kp EQUAL &kp N7 &kp N8 &kp N9 &kp PLUS &trans
|
|
&trans &sk LALT &sk LGUI &sk LSHFT &sk LCTRL &sk RALT &kp STAR &kp N4 &kp N5 &kp N6 &kp MINUS &trans
|
|
&trans &trans &kp C_MENU &kp TAB &kp BSPC &kp RET &trans &trans &trans &trans &kp N0 &kp N1 &kp N2 &kp N3 &kp FSLH &trans
|
|
&none &trans &none &trans &trans &trans &trans &trans &none &none
|
|
>;
|
|
};
|
|
};
|
|
};
|