zmk-config/config/rae_dux.keymap

145 lines
6.4 KiB
Text
Raw Normal View History

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-03-15 05:02:31 +00:00
&caps_word {
continue-list = <UNDERSCORE MINUS BSPC>;
2022-03-14 22:17:15 +00:00
};
2022-06-11 17:22:29 +00:00
#define BASE_L 0
#define SYM_L 1
#define NAV_L 2
#define NUM_L 3
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(caps_word_right, &caps_word, 26 27, 60)
//COMBO(caps_word_left, &caps_word, 22 23, 60)
2022-03-16 01:57:35 +00:00
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)
//COMBO(enter, &kp ENTER, 17 26, 60)
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-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-06-11 17:22:29 +00:00
tapping-term-ms = <175>;
2022-04-03 16:30:14 +00:00
quick-tap-ms = <125>;
2022-03-25 21:09:56 +00:00
global-quick-tap;
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>;
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-06-11 17:22:29 +00:00
tapping-term-ms = <175>;
2022-04-03 16:30:14 +00:00
quick-tap-ms = <125>;
2022-03-25 21:09:56 +00:00
global-quick-tap;
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>;
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
};
base_lt: base_layer_hold_tap {
2022-03-14 22:17:15 +00:00
compatible = "zmk,behavior-hold-tap";
label = "BASE_LAYER_HOLD_TAP";
2022-03-14 22:17:15 +00:00
#binding-cells = <2>;
flavor = "tap-preferred";
tapping-term-ms = <200>;
2022-03-25 21:09:56 +00:00
quick-tap-ms = <50>;
global-quick-tap;
2022-03-14 22:17:15 +00:00
bindings = <&mo>, <&kp>;
};
2022-06-11 17:22:29 +00:00
conditional_layers {
compatible = "zmk,conditional-layers";
tri_layer {
if-layers = <NAV_L SYM_L>;
then-layer = <NUM_L>;
};
};
2022-03-14 22:17:15 +00:00
};
2022-06-11 17:22:29 +00:00
keymap {
compatible = "zmk,keymap";
base_layer {
bindings = <
&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
&mo NAV_L &kp LSHFT &none &none &kp SPACE &mo SYM_L
>;
};
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
>;
};
nav_layer {
bindings = <
&kp TAB &none &kp C_VOL_UP &kp C_VOL_DN &kp C_MUTE &none &none &none &none &bootloader
&kp LSHFT &kp LALT &kp LCTRL &kp LGUI &kp BACKSPACE &kp LEFT &kp DOWN &kp UP &kp RIGHT &none
&out OUT_TOG &bt BT_SEL 3 &bt BT_SEL 2 &bt BT_CLR &kp PRINTSCREEN &none &kp PG_DN &kp PG_UP &none &kp RETURN
&trans &trans &trans &trans &trans &trans
>;
};
num_layer {
bindings = <
&kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0
&kp LSHFT &kp LALT &kp LCTRL &kp LGUI &lhm RALT F11 &rhm RALT F12 &kp LGUI &kp LCTRL &kp LALT &kp LSHFT
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10
&trans &trans &trans &trans &trans &trans
>;
};
};
2022-03-14 22:17:15 +00:00
};