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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
|
// Copyright (c) 2022 The ZMK Contributors
// SPDX-License-Identifier: MIT
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
// Layer definitions
#define BASE 0
#define SYM 1
#define NUM 2
#define NAV 3
#define SETTINGS 4
// Home row mods macro
#define HRML(k1,k2,k3) &lht LALT k1 &lht LCTRL k2 &lht LGUI k3
#define HRMR(k1,k2,k3) &rht RGUI k1 &rht RCTRL k2 &rht LALT k3
// Hold to shift, tap to go to BASE layer
#define SHIFT &hl LSHIFT BASE
// (Alphas) Cluster definitions
#define RHS 5 6 7 8 9 \
15 16 17 18 19 \
25 26 27 28 29
#define LHS 0 1 2 3 4 \
10 11 12 13 14 \
20 21 22 23 24
/ {
behaviors {
// left-hold-tap
lht: left_hold_tap {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "balanced";
tapping-term-ms = <175>;
require-prior-idle-ms = <100>;
quick-tap-ms = <50>;
bindings = <&kp>, <&kp>;
// Hold trigger on opposite side, RHS and tab
hold-trigger-key-positions = <RHS 31>;
};
// left-hold-tap
rht: right_hold_tap {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "balanced";
tapping-term-ms = <175>;
require-prior-idle-ms = <100>;
quick-tap-ms = <50>;
bindings = <&kp>, <&kp>;
// Hold trigger on opposite side, LHS and tab
hold-trigger-key-positions = <LHS 31>;
};
// Used for shift
hl: hold_layer {
compatible = "zmk,behavior-hold-tap";
flavor = "balanced";
#binding-cells = <2>;
tapping-term-ms = <220>;
quick-tap-ms = <190>;
bindings = <&kp>, <&to>;
};
};
macros {
esc: esc {
label = "esc";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings
= <¯o_tap &kp ESC>
, <¯o_tap &to BASE>
;
};
};
combos {
compatible = "zmk,combos";
combo_compose {
timeout-ms = <150>;
// tab + space
key-positions = <31 32>;
bindings = <&kp RALT>;
layers = <BASE SYM NUM NAV>;
};
combo_esc {
timeout-ms = <150>;
// lshift + sym
key-positions = <30 33>;
bindings = <&esc>;
layers = <BASE SYM NUM NAV>;
};
// Combo for settings layer
combo_settings {
timeout-ms = <150>;
// t + y
key-positions = <4 5>;
bindings = <&to SETTINGS>;
layers = <NAV>;
};
};
keymap {
compatible = "zmk,keymap";
// BASE
default_layer {
bindings = <
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
//│ Q │ W │ F │ P │ B │ │ J │ L │ U │ Y │ │
&kp Q &kp W &kp F &kp P &kp B &kp J &kp L &kp U &kp Y &kp BSPC
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ A │ R │ S │ T │ G │ │ M │ N │ E │ I │ O │
&kp A HRML(R, S, T) &kp G &kp M HRMR(N, E, I) &kp O
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ Z │ X │ C │ D │ V │ │ K │ H │ , < │ . > │ │
&kp Z &kp X &kp C &kp D &kp V &kp K &kp H &kp COMMA &kp DOT &kp ENTER
//╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
&kp LSHIFT &kp TAB &kp SPACE &to SYM
// ╰──────────┴──────────╯ ╰──────────┴──────────╯
>;
};
// SYM
sym_layer {
bindings = <
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
//│ \ │ + │ ' │ ; : │ ` ~ │ │ / ? │ : │ " │ & │ │
&kp BSLH &kp PLUS &kp SQT &kp SEMI &kp GRAVE &kp FSLH &kp COLON &kp DQT &kp AMPS &trans
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ ^ │ = + │ ( │ ) │ @ │ │ | │ [ │ ] │ % │ $ │
&kp CARET HRML(EQUAL, LPAR, RPAR) &kp AT &kp PIPE HRMR(LBKT, RBKT, PRCNT) &kp DLLR
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ ! │ # │ { │ } │ ~ │ │ * │ - _ │ , < │ . > │ │
&kp EXCL &kp HASH &kp LBRC &kp RBRC &kp TILDE &kp ASTRK &kp MINUS &trans &trans &trans
//╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
SHIFT &trans &trans &to NUM
// ╰──────────┴──────────╯ ╰──────────┴──────────╯
>;
};
// NUM
num_layer {
bindings = <
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
//│ \ │ + │ ' │ ; : │ ` ~ │ │ / ? │ : │ " │ & │ │
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │
&kp N1 HRML(N2, N3, N4) &kp N5 &kp N6 HRMR(N7, N8, N9) &kp N0
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ ! │ # │ { │ } │ ~ │ │ * │ - _ │ , < │ . > │ │
&trans &trans &trans &trans &trans &kp FSLH &kp MINUS &trans &trans &trans
//╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
SHIFT &trans &trans &to NAV
// ╰──────────┴──────────╯ ╰──────────┴──────────╯
>;
};
// NAV
nav_layer {
bindings = <
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
//│ │ │ │ │ │ │ │ │ │ │ │
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &none &none &none &none &trans
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ │ │ │ │ │ │ ← │ ↓ │ ↑ │ → │ │
&kp F6 HRML(F7, F8, F9) &kp F10 &kp LEFT HRMR(DOWN, UP, RIGHT) &kp ENTER
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ │ │ │ │ │ │ │ │ │ │ │
&kp F11 &kp F12 &kp F13 &kp F14 &kp F15 &none &none &none &none &trans
//╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
SHIFT &trans &trans &to SYM
// ╰──────────┴──────────╯ ╰──────────┴──────────╯
>;
};
// SETTINGS
settings_layer {
bindings = <
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
//│ │ │ RESET │BOOTLOADER│ │ │ │ │ │ │ │
&none &none &sys_reset &bootloader &none &none &none &none &none &none
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ Profile 1│ │ │ │PROFILE 1 │ │ │ │ │ │ │
&bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &none &none &none &none &none &none
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ │ │ │ CLEAR BT │ │ │ │ │ │ │ │
&none &none &none &bt BT_CLR &none &none &none &none &none &none
//╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
&to BASE &trans &kp SPACE &to SYM
// ╰──────────┴──────────╯ ╰──────────┴──────────╯
>;
};
};
};
|