Files
zmk-config/config/wyld_dm.keymap
T

119 lines
5.4 KiB
Plaintext

/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <dt-bindings/led/led.h>
#include <behaviors/mouse_keys.dtsi>
#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/mouse.h>
#include <dt-bindings/zmk/rgb.h>
// triggering build
#define QWERTY 0
#define LOWER 1
#define RAISE 2
//# 4x6 with encoders
/ {
behaviors {
rgb_encoder_bright: rgb_encoder_bright {
compatible = "zmk,behavior-sensor-rotate";
#sensor-binding-cells = <0>;
bindings = <&rgb_ug RGB_BRI>, <&rgb_ug RGB_BRD>;
};
hm_left: hm_left {
compatible = "zmk,behavior-hold-tap";
label = "HM_LEFT";
bindings = <&kp>, <&kp>;
#binding-cells = <2>;
tapping-term-ms = <200>;
flavor = "tap-preferred";
hold-trigger-key-positions = <6 7 8 9 10 11 18 19 20 21 22 23 30 31 32 33 34 35 40 41>;
};
hm_right: hm_right {
compatible = "zmk,behavior-hold-tap";
label = "HM_RIGHT";
bindings = <&kp>, <&kp>;
#binding-cells = <2>;
tapping-term-ms = <200>;
flavor = "tap-preferred";
hold-trigger-key-positions = <0 1 2 3 4 5 12 13 14 15 16 17 24 25 26 27 28 29 36 37>;
};
// rgb_encoder_hue: rgb_encoder_hue {
// compatible = "zmk,behavior-sensor-rotate";
// #sensor-binding-cells = <0>;
// bindings = <&rgb_ug RGB_HUI>, <&rgb_ug RGB_HUD>;
// };
};
keymap {
compatible = "zmk,keymap";
default_layer {
display-name = "QWERTY";
bindings = <
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT
&kp CAPS &hm_left LCTRL A &hm_left LEFT_GUI S &hm_left LEFT_ALT D &hm_left LEFT_SHIFT F &kp G &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 N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
&kp LBRC &kp RBRC &mo RAISE &kp SPACE &kp KP_PLUS &kp KP_MINUS
&kp DEL &mkp LCLK &mkp RCLK &kp TAB &kp K_MUTE &mo LOWER &kp ENTER &kp BSPC &kp RCTL
>;
sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP>;
};
lower_layer {
display-name = "LOWER";
bindings = <
&trans &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp F11
&kp GRAVE &kp EXCL &kp AT &kp HASH &kp DOLLAR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp F12
&bootloader &ext_power EP_ON &ext_power EP_OFF &rgb_ug RGB_ON &rgb_ug RGB_OFF &trans &trans &kp MINUS &kp KP_PLUS &kp LBRC &kp RBRC &bootloader
&rgb_ug RGB_EFF &rgb_ug RGB_EFR &trans &trans &trans &trans
&trans &trans &trans &trans &rgb_ug RGB_TOG &trans &trans &trans &trans
>;
sensor-bindings = <&rgb_encoder_bright>;
};
raise_layer {
display-name = "RAISE";
bindings = <
&trans &trans &trans &trans &trans &kp LBKT &kp RBKT &trans &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_DIVIDE
&kp LEFT &kp DOWN &kp UP &kp RIGHT &kp PGUP &kp LPAR &kp RPAR &trans &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_MULTIPLY
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_MINUS
&kp PG_UP &kp PG_DN &trans &trans &kp KP_PLUS &kp KP_MINUS
&trans &trans &trans &trans &kp HOME &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp PG_UP PG_DN>;
};
mouse_layer {
display-name = "MOUSE";
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &mkp LCLK &mkp RCLK &trans &trans &mkp LCLK &mkp RCLK &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans
&trans &mkp LCLK &mkp RCLK &trans &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP>;
};
};
};
&led_strip { chain-length = <62>; };