2021-01-19 03:14:14 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2020 The ZMK Contributors
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <behaviors.dtsi>
|
|
|
|
#include <dt-bindings/zmk/keys.h>
|
2021-05-04 04:53:32 +00:00
|
|
|
#include <dt-bindings/zmk/rgb.h>
|
|
|
|
#include <dt-bindings/zmk/ext_power.h>
|
2021-01-19 03:14:14 +00:00
|
|
|
|
2021-05-01 20:39:38 +00:00
|
|
|
#define TIMEOUT_COMBO 250
|
2021-04-29 01:32:37 +00:00
|
|
|
|
2021-01-19 03:14:14 +00:00
|
|
|
#define LAYER_ID_DEFAULT 0
|
2021-04-29 01:32:37 +00:00
|
|
|
#define LAYER_ID_NAV 1
|
|
|
|
#define LAYER_ID_FUNC 2
|
|
|
|
#define LAYER_ID_ALT 3
|
2021-05-04 04:53:32 +00:00
|
|
|
#define LAYER_ID_MISC 4
|
2021-01-19 03:14:14 +00:00
|
|
|
|
|
|
|
&pro_micro_i2c {
|
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
|
|
|
/ {
|
|
|
|
sensors {
|
|
|
|
compatible = "zmk,keymap-sensors";
|
|
|
|
sensors = <&encoder_1>;
|
|
|
|
};
|
|
|
|
|
2021-01-20 03:38:25 +00:00
|
|
|
behaviors {
|
|
|
|
tildeesc: tilde_escape {
|
|
|
|
compatible = "zmk,behavior-mod-morph";
|
|
|
|
label = "TILDE_ESCAPE";
|
|
|
|
#binding-cells = <0>;
|
|
|
|
bindings = <&kp ESC>, <&kp TILDE>;
|
|
|
|
mods = <(MOD_LSFT)>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-04-24 18:18:54 +00:00
|
|
|
combos {
|
|
|
|
compatible = "zmk,combos";
|
2021-04-29 01:32:37 +00:00
|
|
|
combo_layer_navigations_left {
|
|
|
|
timeout-ms = <TIMEOUT_COMBO>;
|
2021-04-24 18:18:54 +00:00
|
|
|
key-positions = <34 19 36>;
|
2021-04-29 01:32:37 +00:00
|
|
|
bindings = <&tog LAYER_ID_NAV>;
|
2021-05-01 20:44:26 +00:00
|
|
|
layers = <LAYER_ID_NAV LAYER_ID_FUNC>;
|
2021-04-29 01:32:37 +00:00
|
|
|
};
|
|
|
|
combo_layer_navigation_right {
|
|
|
|
timeout-ms = <TIMEOUT_COMBO>;
|
|
|
|
key-positions = <39 24 41>;
|
|
|
|
bindings = <&tog LAYER_ID_NAV>;
|
2021-05-01 20:44:26 +00:00
|
|
|
layers = <LAYER_ID_NAV LAYER_ID_FUNC>;
|
2021-04-24 18:18:54 +00:00
|
|
|
};
|
2021-04-29 01:32:37 +00:00
|
|
|
combo_shift_lock_left {
|
|
|
|
timeout-ms = <TIMEOUT_COMBO>;
|
2021-04-28 21:31:53 +00:00
|
|
|
key-positions = <19 35>;
|
|
|
|
bindings = <&kt LSHFT>;
|
2021-05-01 20:44:26 +00:00
|
|
|
layers = <LAYER_ID_NAV LAYER_ID_FUNC>;
|
2021-04-28 21:31:53 +00:00
|
|
|
};
|
2021-04-29 01:32:37 +00:00
|
|
|
combo_shift_lock_right {
|
|
|
|
timeout-ms = <TIMEOUT_COMBO>;
|
|
|
|
key-positions = <24 40>;
|
|
|
|
bindings = <&kt LSHFT>;
|
2021-05-01 20:44:26 +00:00
|
|
|
layers = <LAYER_ID_NAV LAYER_ID_FUNC>;
|
2021-04-29 01:32:37 +00:00
|
|
|
};
|
2021-04-24 18:18:54 +00:00
|
|
|
};
|
|
|
|
|
2021-01-19 03:14:14 +00:00
|
|
|
keymap {
|
|
|
|
compatible = "zmk,keymap";
|
|
|
|
|
|
|
|
default_layer {
|
2021-04-24 00:29:15 +00:00
|
|
|
label = "ANSI";
|
2021-01-19 03:14:14 +00:00
|
|
|
|
|
|
|
sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>;
|
|
|
|
|
|
|
|
bindings = <
|
2021-05-01 20:39:38 +00:00
|
|
|
&tildeesc &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp HOME
|
|
|
|
&kp C_MUTE &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 RBKT &kp BSLH &kp PG_UP
|
2021-05-04 04:53:32 +00:00
|
|
|
&mo LAYER_ID_MISC &mo LAYER_ID_ALT &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp PG_DN
|
2021-05-01 20:39:38 +00:00
|
|
|
&trans &kp LSHFT &none &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &kp END
|
|
|
|
&trans &kp LCTRL &kp LGUI &kp LALT &kp SPACE &mo LAYER_ID_FUNC &kp RCTRL &kp RALT &kp LEFT &kp DOWN &kp RIGHT
|
2021-01-19 03:14:14 +00:00
|
|
|
>;
|
|
|
|
};
|
2021-04-29 01:32:37 +00:00
|
|
|
nav_layer {
|
|
|
|
label = "Nav";
|
|
|
|
sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>;
|
|
|
|
|
|
|
|
bindings = <
|
|
|
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp DEL
|
|
|
|
&trans &trans &kp PG_UP &kp HOME &kp UP &kp END &trans &trans &kp HOME &kp UP &kp END &kp PG_UP &trans &trans &trans &trans
|
|
|
|
&none &trans &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT &trans &trans &kp LEFT &kp DOWN &kp RIGHT &kp PG_DN &trans &trans &trans
|
|
|
|
&none &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
|
|
|
&none &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
|
|
|
>;
|
|
|
|
};
|
2021-01-19 03:14:14 +00:00
|
|
|
function_layer {
|
|
|
|
label = "Function";
|
|
|
|
|
|
|
|
sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>;
|
|
|
|
|
|
|
|
bindings = <
|
2021-05-08 16:54:39 +00:00
|
|
|
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &kp DEL
|
|
|
|
&trans &kp CAPS &kp PG_UP &kp HOME &kp UP &kp END &trans &trans &kp HOME &kp UP &kp END &kp PG_UP &trans &trans &kp INS &kp INS
|
|
|
|
&none &trans &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT &trans &trans &kp LEFT &kp DOWN &kp RIGHT &kp PG_DN &trans &kp PSCRN &kp PSCRN
|
|
|
|
&none &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp C_PP
|
2021-04-24 17:52:25 +00:00
|
|
|
&none &trans &trans &trans &trans &trans &kp C_VOLUME_UP &kp C_VOLUME_DOWN &kp C_MUTE &trans &trans
|
2021-01-19 03:14:14 +00:00
|
|
|
>;
|
|
|
|
};
|
|
|
|
alt_layer {
|
|
|
|
label = "Alt";
|
|
|
|
|
|
|
|
sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>;
|
|
|
|
|
|
|
|
bindings = <
|
|
|
|
&trans &kp LA(F1) &kp LA(F2) &kp LA(F3) &kp LA(F4) &kp LA(F5) &kp LA(F6) &kp LA(F7) &kp LA(F8) &kp LA(F9) &kp LA(F10) &kp LA(F11) &kp LA(F12) &trans &trans
|
|
|
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
|
|
|
&none &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
2021-01-22 17:00:06 +00:00
|
|
|
&none &trans &none &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
2021-01-19 03:14:14 +00:00
|
|
|
&none &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
|
|
|
>;
|
|
|
|
};
|
2021-05-04 04:53:32 +00:00
|
|
|
misc_layer {
|
|
|
|
label = "Misc";
|
|
|
|
|
|
|
|
sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>;
|
|
|
|
|
|
|
|
bindings = <
|
2021-05-04 05:40:42 +00:00
|
|
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
|
|
|
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
|
|
|
&mo LAYER_ID_MISC &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
2021-06-04 20:44:08 +00:00
|
|
|
&none &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
|
|
|
&none &rgb_ug RGB_HUI &rgb_ug RGB_HUD &rgb_ug RGB_BRI &rgb_ug RGB_BRD &ext_power EP_TOG &trans &trans &trans &trans &trans
|
2021-05-04 04:53:32 +00:00
|
|
|
>;
|
|
|
|
};
|
2021-01-19 03:14:14 +00:00
|
|
|
};
|
|
|
|
};
|