2022-03-14 22:17:15 +00:00
|
|
|
/*
|
2022-06-11 17:22:29 +00:00
|
|
|
* Copyright (c) 2021 The ZMK Contributors
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*/
|
2022-03-14 22:17:15 +00:00
|
|
|
|
|
|
|
#include <behaviors.dtsi>
|
|
|
|
#include <dt-bindings/zmk/bt.h>
|
|
|
|
#include <dt-bindings/zmk/keys.h>
|
2022-06-11 17:22:29 +00:00
|
|
|
#include <dt-bindings/zmk/outputs.h>
|
2022-10-19 14:41:33 +00:00
|
|
|
// #include <dt-bindings/zmk/mouse.h>
|
2022-03-15 05:02:31 +00:00
|
|
|
|
2022-06-11 17:22:29 +00:00
|
|
|
#define BASE_L 0
|
2022-10-31 01:27:02 +00:00
|
|
|
#define BASER_L 1
|
|
|
|
#define SYM_L 2
|
2022-10-31 01:47:33 +00:00
|
|
|
#define MOD_L 3
|
2022-10-31 01:27:02 +00:00
|
|
|
#define NUM_L 4
|
|
|
|
#define FUN_L 5
|
2022-10-31 01:47:33 +00:00
|
|
|
#define NAV_L 6
|
2022-10-19 14:41:33 +00:00
|
|
|
// #define MOUSE_L 5
|
2022-03-14 22:17:15 +00:00
|
|
|
|
2022-08-26 20:34:47 +00:00
|
|
|
< {
|
|
|
|
flavor = "tap-preferred";
|
|
|
|
tapping-term-ms = <150>;
|
|
|
|
quick-tap-ms = <0>;
|
|
|
|
};
|
2022-08-25 20:46:21 +00:00
|
|
|
|
2022-03-14 22:17:15 +00:00
|
|
|
/ {
|
2022-03-15 05:02:31 +00:00
|
|
|
combos {
|
|
|
|
compatible = "zmk,combos";
|
|
|
|
|
|
|
|
#define COMBO(NAME, BINDINGS, KEYPOS, TIMEOUT) \
|
|
|
|
combo_##NAME { \
|
|
|
|
timeout-ms = <TIMEOUT>; \
|
|
|
|
bindings = <BINDINGS>; \
|
|
|
|
key-positions = <KEYPOS>; \
|
|
|
|
};
|
|
|
|
|
|
|
|
/* KEY POSITIONS
|
|
|
|
|
|
|
|
╭────────────────────╮ ╭────────────────────╮
|
|
|
|
│ 0 1 2 3 4 │ │ 5 6 7 8 9 │
|
|
|
|
│ 10 11 12 13 14 │ │ 15 16 17 18 19 │
|
|
|
|
│ 20 21 22 23 24 │ │ 25 26 27 28 29 │
|
|
|
|
╰───────╮ 30 31 32 │ │ 33 34 35 ╭───────╯
|
|
|
|
╰────────────╯ ╰────────────╯ */
|
|
|
|
|
2022-06-11 17:22:29 +00:00
|
|
|
//COMBO(colon, &kp COLON, 7 8, 60)
|
|
|
|
//COMBO(semicolon, &kp SEMI, 27 28, 60)
|
|
|
|
//COMBO(slash, &kp FSLH, 1 2, 60)
|
2022-03-16 01:57:35 +00:00
|
|
|
|
2022-06-11 17:22:29 +00:00
|
|
|
//COMBO(minus, &kp MINUS, 31 32, 100)
|
|
|
|
//COMBO(underscore, &kp UNDER, 33 34, 100)
|
2022-03-16 01:57:35 +00:00
|
|
|
|
2022-06-11 17:22:29 +00:00
|
|
|
//COMBO(equal, &kp EQUAL, 12 23, 100)
|
2022-11-08 14:24:20 +00:00
|
|
|
COMBO(enter, &kp ENTER, 13 23, 120)
|
|
|
|
COMBO(escape, &kp ESC, 20 12 13, 120)
|
2022-03-16 14:44:24 +00:00
|
|
|
|
|
|
|
COMBO(reset_left, &bootloader, 0 1 2 3, 100)
|
2022-06-11 17:22:29 +00:00
|
|
|
COMBO(reset_right, &bootloader, 6 7 8 9, 100)
|
2022-08-26 18:29:14 +00:00
|
|
|
|
2022-11-08 16:12:46 +00:00
|
|
|
COMBO(caps_word, &caps_word, 20 21 22 13, 180)
|
2022-03-15 05:02:31 +00:00
|
|
|
};
|
|
|
|
|
2022-03-14 22:17:15 +00:00
|
|
|
behaviors {
|
|
|
|
lhm: left_hand_positional_hold_tap {
|
|
|
|
compatible = "zmk,behavior-hold-tap";
|
|
|
|
label = "LEFT_POSITIONAL_HOLD_TAP";
|
|
|
|
#binding-cells = <2>;
|
|
|
|
flavor = "tap-preferred";
|
2022-08-19 10:18:29 +00:00
|
|
|
tapping-term-ms = <150>;
|
|
|
|
quick-tap-ms = <0>;
|
2022-03-14 22:17:15 +00:00
|
|
|
bindings = <&kp>, <&kp>;
|
2022-03-25 21:09:56 +00:00
|
|
|
// hold-trigger-key-positions = <5 6 7 8 9 15 16 17 18 19 25 26 27 28 29 30 31 32 33 34 35>;
|
2022-08-19 10:18:29 +00:00
|
|
|
// hold-trigger-key-positions = <5 6 7 8 9 10 11 12 13 15 16 17 18 19 25 26 27 28 29 30 31 32 33 34 35>;
|
2022-03-16 15:38:17 +00:00
|
|
|
};
|
2022-03-14 22:17:15 +00:00
|
|
|
|
|
|
|
rhm: right_hand_positional_hold_tap {
|
|
|
|
compatible = "zmk,behavior-hold-tap";
|
|
|
|
label = "RIGHT_POSITIONAL_HOLD_TAP";
|
|
|
|
#binding-cells = <2>;
|
|
|
|
flavor = "tap-preferred";
|
2022-08-19 10:18:29 +00:00
|
|
|
tapping-term-ms = <150>;
|
|
|
|
quick-tap-ms = <0>;
|
2022-03-14 22:17:15 +00:00
|
|
|
bindings = <&kp>, <&kp>;
|
2022-03-25 21:09:56 +00:00
|
|
|
// hold-trigger-key-positions = <0 1 2 3 4 10 11 12 13 14 20 21 22 23 24 30 31 32 33 34 35>;
|
2022-08-19 10:18:29 +00:00
|
|
|
// hold-trigger-key-positions = <0 1 2 3 4 10 11 12 13 14 16 17 18 19 20 21 22 23 24 30 31 32 33 34 35>;
|
2022-03-14 22:17:15 +00:00
|
|
|
};
|
|
|
|
|
2022-06-11 17:22:29 +00:00
|
|
|
conditional_layers {
|
|
|
|
compatible = "zmk,conditional-layers";
|
|
|
|
tri_layer {
|
2022-06-15 00:17:00 +00:00
|
|
|
if-layers = <NUM_L SYM_L>;
|
|
|
|
then-layer = <FUN_L>;
|
2022-06-11 17:22:29 +00:00
|
|
|
};
|
|
|
|
};
|
2022-03-14 22:17:15 +00:00
|
|
|
};
|
|
|
|
|
2022-06-11 17:22:29 +00:00
|
|
|
keymap {
|
|
|
|
compatible = "zmk,keymap";
|
|
|
|
|
|
|
|
base_layer {
|
|
|
|
bindings = <
|
2022-10-31 01:27:02 +00:00
|
|
|
// &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
|
|
|
|
// &lhm LSHFT A &lhm LALT S &lhm LCTRL D &lhm LGUI F &lhm RALT G &rhm RALT H &rhm LGUI J &rhm LCTRL K &rhm LALT L &rhm LSHFT SEMI
|
|
|
|
// &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp SINGLE_QUOTE
|
2022-10-31 01:47:33 +00:00
|
|
|
// &mo MOD_L &none &none &none < NUM_L SPACE &mo SYM_L
|
2022-11-08 14:25:02 +00:00
|
|
|
&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
|
2022-11-08 15:18:12 +00:00
|
|
|
< NUM_L A &kp S &kp D &kp F &kp G &rhm RALT H &rhm LGUI J &rhm LCTRL K &rhm LALT L &rhm LSHFT SEMI
|
2022-11-08 14:25:02 +00:00
|
|
|
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp SINGLE_QUOTE
|
2022-10-31 01:47:33 +00:00
|
|
|
&mo MOD_L &mo NAV_L < BASER_L SPACE &none < NUM_L SPACE &mo SYM_L
|
2022-10-31 01:27:02 +00:00
|
|
|
>;
|
|
|
|
};
|
|
|
|
base_r_layer {
|
|
|
|
bindings = <
|
|
|
|
&kp P &kp O &kp I &kp U &kp Y &none &none &none &none &none
|
|
|
|
&kp SEMI &kp L &kp K &kp J &kp H &none &none &none &none &none
|
|
|
|
&kp SINGLE_QUOTE &kp DOT &kp COMMA &kp M &kp N &none &none &none &none &none
|
|
|
|
&trans &none &none &none &none &none
|
2022-06-11 17:22:29 +00:00
|
|
|
>;
|
|
|
|
};
|
|
|
|
|
|
|
|
sym_layer {
|
|
|
|
bindings = <
|
|
|
|
&kp ESC &kp LBKT &kp LBRC &kp LPAR &kp TILDE &kp CARET &kp RPAR &kp RBRC &kp RBKT &kp GRAVE
|
|
|
|
&kp MINUS &kp STAR &kp EQUAL &kp UNDERSCORE &kp DOLLAR &rhm RALT HASH &kp LGUI &kp LCTRL &kp LALT &kp LSHFT
|
|
|
|
&kp PLUS &kp PIPE &kp AT &kp SLASH &kp PERCENT &kp AMPERSAND &kp BACKSLASH &kp RA(SLASH) &kp QUESTION &kp EXCLAMATION
|
|
|
|
&trans &trans &trans &trans &trans &trans
|
|
|
|
>;
|
|
|
|
};
|
|
|
|
|
2022-10-31 01:47:33 +00:00
|
|
|
mod_layer {
|
2022-06-11 17:22:29 +00:00
|
|
|
bindings = <
|
2022-10-19 14:41:33 +00:00
|
|
|
&none &none &kp C_VOL_UP &kp C_VOL_DN &kp C_MUTE &none &none &kp TAB &none &bootloader
|
2022-10-31 01:27:02 +00:00
|
|
|
&sk LSHFT &sk LALT &sk LCTRL &sk LGUI &kp BACKSPACE &kp LEFT &kp DOWN &kp UP &kp RIGHT &none
|
2022-10-19 14:41:33 +00:00
|
|
|
&out OUT_TOG &bt BT_SEL 3 &bt BT_SEL 2 &bt BT_CLR &kp PRINTSCREEN &kp HOME &kp PG_DN &kp PG_UP &kp END &kp RETURN
|
|
|
|
&trans &trans &trans &trans &trans &trans
|
2022-06-11 17:22:29 +00:00
|
|
|
>;
|
|
|
|
};
|
|
|
|
|
|
|
|
num_layer {
|
|
|
|
bindings = <
|
2022-11-08 15:22:03 +00:00
|
|
|
&none &kp N7 &kp N8 &kp N9 &kp PLUS &none &none &none &none &none
|
|
|
|
&none &kp N4 &kp N5 &kp N6 &kp N0 &none &none &none &none &none
|
|
|
|
&none &kp N1 &kp N2 &kp N3 &kp MINUS &none &none &none &none &none
|
|
|
|
&trans &trans &trans &trans &trans &trans
|
2022-06-15 00:17:00 +00:00
|
|
|
>;
|
|
|
|
};
|
|
|
|
|
|
|
|
fun_layer {
|
|
|
|
bindings = <
|
|
|
|
&none &none &none &none &none &none &kp F7 &kp F8 &kp F9 &kp F12
|
|
|
|
&kp LSHFT &kp LALT &kp LCTRL &kp LGUI &kp RALT &none &kp F4 &kp F5 &kp F6 &kp F11
|
|
|
|
&none &none &none &none &none &none &kp F1 &kp F2 &kp F3 &kp F10
|
|
|
|
&trans &trans &trans &trans &trans &trans
|
2022-06-11 17:22:29 +00:00
|
|
|
>;
|
|
|
|
};
|
2022-08-26 18:29:14 +00:00
|
|
|
|
2022-10-31 01:47:33 +00:00
|
|
|
nav_layer {
|
|
|
|
bindings = <
|
2022-11-08 15:18:26 +00:00
|
|
|
&kp LCTL &kp PG_UP &kp UP &kp PG_DN &kp LS(TAB) &none &none &none &none &none
|
|
|
|
&kp LSHFT &kp LEFT &kp DOWN &kp RIGHT &kp TAB &none &none &none &none &none
|
2022-11-08 15:22:18 +00:00
|
|
|
&kp LALT &kp LG(PG_UP) &kp LG(PG_DN) &none &none &none &none &none &none &none
|
2022-11-08 15:18:26 +00:00
|
|
|
&trans &trans &trans &none &none &none
|
2022-10-31 01:47:33 +00:00
|
|
|
>;
|
|
|
|
};
|
|
|
|
|
2022-10-19 14:41:33 +00:00
|
|
|
// mouse_layer {
|
|
|
|
// bindings = <
|
|
|
|
// &none &none &none &none &none &none &mkp LCLK &mkp RCLK &none &none
|
|
|
|
// &kp LSHFT &kp LALT &kp LCTRL &mkp LCLK &mkp RCLK &mmv MOVE_LEFT &mmv MOVE_DOWN &mmv MOVE_UP &mmv MOVE_RIGHT &none
|
|
|
|
// &none &none &none &none &none &mmv SCROLL_LEFT &mwh SCROLL_DOWN &mwh SCROLL_UP &mmv SCROLL_RIGHT &none
|
|
|
|
// &trans &trans &trans &trans &trans &trans
|
|
|
|
// >;
|
|
|
|
// };
|
2022-06-11 17:22:29 +00:00
|
|
|
};
|
2022-03-14 22:17:15 +00:00
|
|
|
};
|