-
Notifications
You must be signed in to change notification settings - Fork 0
/
glove80.keymap
235 lines (206 loc) · 14.7 KB
/
glove80.keymap
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
#include <behaviors.dtsi>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/outputs.h>
#include <dt-bindings/zmk/rgb.h>
#define LAYER_MAIN 0
#define LAYER_SYMBOLS 1
#define LAYER_GAMING 2
#define LAYER_NAV 3
#define LAYER_SYSTEM 4
#define LAYER_FN 5
#define LAYER_GAMING_MESSAGE 6
#define LAYER_GAMING_MESSAGE_NAV 7
#define LAYER_MAGIC 8
#define KEYS_LEFT_AND_THUMB <5 6 7 8 9 16 17 18 19 20 21 28 29 30 31 32 33 40 41 42 43 44 45 56 57 58 59 60 61 62 63 74 75 76 77 78 79 55 72 73 69 70 71 54 53 52>
#define KEYS_RIGHT_AND_THUMB <0 1 2 3 4 10 11 12 13 14 15 22 23 24 25 26 27 34 35 36 37 38 39 46 47 48 49 50 51 52 53 54 64 65 66 67 68 69 70 71 55 56 57 74 73 72>
#define DEFINE_HM(_name_, _label_, _hold_, _tap_, _keys_) \
_name_: _name_ { \
compatible = "zmk,behavior-hold-tap"; \
label = _label_; \
bindings = _hold_, _tap_; \
#binding-cells = <2>; \
tapping-term-ms = <270>; \
require-prior-idle-ms = <80>; \
flavor = "tap-preferred"; \
hold-trigger-key-positions = _keys_; \
hold-trigger-on-release; \
quick-tap-ms = <150>; \
}
&sk { quick-release; };
< {
quick-tap-ms = <150>;
};
/ {
behaviors {
DEFINE_HM(hml, "HML", <&kp>, <&kp>, KEYS_LEFT_AND_THUMB);
DEFINE_HM(hmr, "HMR", <&kp>, <&kp>, KEYS_RIGHT_AND_THUMB);
DEFINE_HM(hmr_gx_msg_lv, "HMR_GX_MSG_LV", <&kp>, <&gx_msg_lv>, KEYS_RIGHT_AND_THUMB);
smart_shift: smart_shift {
compatible = "zmk,behavior-mod-morph";
label = "SMART_SHIFT";
bindings = <&sk LSHFT>, <&caps_word>;
#binding-cells = <0>;
mods = <(MOD_LSFT)>;
};
};
macros {
rgb_ug_status_macro: rgb_ug_status_macro_0 {
label = "RGB_UG_STATUS";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&rgb_ug RGB_STATUS>;
};
bt_0: bt_profile_macro_0 {
label = "BT_0";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&out OUT_BLE &bt BT_SEL 0>;
};
bt_1: bt_profile_macro_1 {
label = "BT_1";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&out OUT_BLE &bt BT_SEL 1>;
};
bt_2: bt_profile_macro_2 {
label = "BT_2";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&out OUT_BLE &bt BT_SEL 2>;
};
bt_3: bt_profile_macro_3 {
label = "BT_3";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&out OUT_BLE &bt BT_SEL 3>;
};
// Enter gaming_message and press key
gx_msg_er: gx_msg_er {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&kp RET &to LAYER_GAMING_MESSAGE>;
label = "GX_MSG_ER";
};
// Leave gaming_message and press key
gx_msg_lv: gx_msg_lv {
compatible = "zmk,behavior-macro-one-param";
#binding-cells = <1>;
bindings = <¯o_param_1to1 &kp MACRO_PLACEHOLDER &to LAYER_GAMING>;
label = "GX_MSG_LV";
};
paamayim_nekudotayim: paamayim_nekudotayim {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings =
<¯o_press>,
<&kp LEFT_SHIFT>,
<¯o_tap>,
<&kp SEMI &kp SEMI>,
<¯o_release>,
<&kp LSHFT>;
label = "::";
};
};
combos { compatible = "zmk,combos"; };
keymap {
compatible = "zmk,keymap";
layer_main {
bindings = <
&none &none &none &none &none &none &none &none &none &mo LAYER_MAGIC
&none &kp N3 &kp N2 &kp N1 &kp N0 &kp N4 &kp N7 &kp N6 &kp N5 &kp N9 &kp N8 &none
&kp MINUS &kp Q &kp H &kp O &kp U &kp DOT &kp G &kp D &kp L &kp F &kp B &none
&kp ESC &hml LALT Y &hml LGUI I &hml LCTRL E &hml LSHFT A &kp COMMA &kp M &hmr LSHFT S &hmr LCTRL R &hmr LGUI N &hmr LALT W &kp TAB
&none &kp J &kp SQT &kp SLASH &kp UNDER &kp X &kp RCTRL &to LAYER_GAMING &none &none &none &kp RET &kp V &kp K &kp C &kp P &kp Z &none
&none &none &none &sl LAYER_FN &sl LAYER_SYSTEM < LAYER_NAV SPACE &smart_shift &kp DEL &none &kp BSPC < LAYER_SYMBOLS T &none &none &none &none &none
>;
};
layer_symbols {
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &kp AT &kp RA(S) &kp RA(O) &kp DQT &kp PRCNT &kp RA(A) &kp RA(U) &kp LBKT &kp RBKT &kp DLLR &trans
&trans &hml LALT EQUAL &hml LGUI LPAR &hml LCTRL RPAR &hml LSHFT SEMI &kp QMARK &kp EXCL &hmr LSHFT COLON &hmr LCTRL LBRC &hmr LGUI RBRC &hmr LALT HASH &trans
&trans &kp PIPE &kp AMPS &paamayim_nekudotayim &kp GRAVE &kp BSLH &trans &trans &trans &trans &trans &trans &kp STAR &kp LT &kp GT &kp PLUS &kp CARET &trans
&trans &trans &trans &kp RA(E) &kp TILDE &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
};
layer_gaming {
bindings = <
&kp N &kp Z &kp H &kp B &kp J &trans &trans &trans &trans &trans
&kp N8 &kp N5 &kp N2 &kp N3 &kp N1 &kp N4 &trans &trans &trans &trans &trans &trans
&kp V &kp ESC &kp C &kp X &kp Q &kp G &kp DOT &kp U &kp I &kp O &kp SEMI &kp BSPC
&kp LCTRL &kp LSHFT &kp A &kp W &kp D &kp F &kp COMMA &kp LEFT &kp UP &kp RIGHT &kp P &kp ENTER
&gx_msg_er &kp TAB &kp R &kp S &kp E &kp T &trans &to LAYER_MAIN &trans &trans &trans &trans &kp FSLH &kp J &kp DOWN &kp K &kp L &trans
&kp GRAVE &kp N7 &kp N6 &kp M &mo LAYER_SYSTEM &kp SPACE &kp LALT &mo LAYER_FN &trans &trans &kp L &trans &trans &trans &trans &trans
>;
};
layer_nav {
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &kp HOME &kp PAGE_DOWN &kp PAGE_UP &kp END &trans &trans &trans &trans &trans &trans &trans
&trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans &hmr LSHFT RET &kp LCTRL &kp LGUI &kp LALT &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 &trans &trans &trans &trans
>;
};
layer_system {
bindings = <
&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 &trans &trans &trans
&trans &kp C_PREV &kp C_NEXT &kp C_PLAY_PAUSE &kp C_MUTE &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 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
};
layer_fn {
bindings = <
&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 &kp F12 &kp F11 &trans &trans &trans &trans &trans &trans &trans
&trans &kp F3 &kp F2 &kp F1 &kp F10 &kp F4 &trans &kp LSHFT &kp LCTRL &kp LGUI &kp LALT &trans
&trans &kp F7 &kp F6 &kp F5 &kp F9 &kp F8 &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
>;
};
layer_gaming_message {
bindings = <
&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 &trans &trans &trans
&gx_msg_lv ESC &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &gx_msg_lv RET &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
};
layer_gaming_message_nav {
bindings = <
&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 &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &hmr_gx_msg_lv LSHFT RET &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 &trans &trans &trans &trans &trans &trans &trans
>;
};
layer_magic {
bindings = <
&bt BT_CLR &bt BT_CLR_ALL &none &none &none &none &none &none &none &none
&none &none &none &none &none &none &none &none &none &none &none &none
&none &rgb_ug RGB_SPI &rgb_ug RGB_SAI &rgb_ug RGB_HUI &rgb_ug RGB_BRI &rgb_ug RGB_TOG &none &none &none &none &none &none
&bootloader &rgb_ug RGB_SPD &rgb_ug RGB_SAD &rgb_ug RGB_HUD &rgb_ug RGB_BRD &rgb_ug RGB_EFF &none &none &none &none &none &bootloader
&sys_reset &none &none &none &none &none &bt_2 &bt_3 &none &none &none &none &none &none &none &none &none &sys_reset
&none &none &none &none &none &bt_0 &bt_1 &out OUT_USB &none &none &none &none &none &none &none &trans
>;
};
};
conditional_layers {
compatible = "zmk,conditional-layers";
cond_gaming_message_nav {
if-layers = <LAYER_GAMING_MESSAGE LAYER_NAV>;
then-layer = <LAYER_GAMING_MESSAGE_NAV>;
};
};
};