-
Notifications
You must be signed in to change notification settings - Fork 231
Expand file tree
/
Copy pathkeymap.zmk
More file actions
10963 lines (10714 loc) · 426 KB
/
Copy pathkeymap.zmk
File metadata and controls
10963 lines (10714 loc) · 426 KB
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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright (c) 2020 The ZMK Contributors
* Copyright (c) 2025 Innaworks Development Limited, trading as MoErgo
*
* SPDX-License-Identifier: MIT
*/
/* THIS FILE WAS GENERATED BY GLOVE80 LAYOUT EDITOR
*
* This file was generated automatically. You may or may not want to
* edit it directly.
*/
#include <behaviors.dtsi>
/* Include all behavior includes needed */
#include <dt-bindings/zmk/outputs.h>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/rgb.h>
/* On demand includes */
#include <dt-bindings/zmk/pointing.h>
/* Helper Macros, based on https://github.com/urob/zmk-helpers/ */
#pragma once
#define ZMK_HELPER_STRINGIFY(x) #x
// Preprocessor mechanism to overload macros, cf. https://stackoverflow.com/a/27051616/6114651
#define VARGS_(_10, _9, _8, _7, _6, _5, _4, _3, _2, _1, N, ...) N
#define VARGS(...) VARGS_(__VA_ARGS__, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)
#define CONCAT_(a, b) a##b
#define CONCAT(a, b) CONCAT_(a, b)
#define ZMK_BEHAVIOR_CORE_tap_dance \
compatible = "zmk,behavior-tap-dance"; \
#binding-cells = <0>
#define ZMK_BEHAVIOR(name, type, ...) \
name: name { \
ZMK_BEHAVIOR_CORE_ ## type; \
__VA_ARGS__ \
};
#define ZMK_TAP_DANCE(name, ...) \
ZMK_BEHAVIOR(name, tap_dance, __VA_ARGS__)
#define ZMK_TD_LAYER(name, layer) \
ZMK_TAP_DANCE(name, \
tapping-term-ms = <200>; \
bindings = <&mo layer>, <&to layer>; \
)
/* Environment and metadata defines */
#define KB_TYPE_GLOVE_80 1
#define KB_TYPE_GO_60 2
#define KB_TYPE KB_TYPE_GLOVE_80
#define EDITOR_HOST_OS 'L'
/* Automatically generated layer name defines */
#define LAYER_Enthium 0
#define LAYER_Dvorak 1
#define LAYER_Colemak 2
#define LAYER_QWERTY 3
#define LAYER_macOS 4
#define LAYER_Typing 5
#define LAYER_LeftPinky 6
#define LAYER_LeftRingy 7
#define LAYER_LeftMiddy 8
#define LAYER_LeftIndex 9
#define LAYER_RightIndex 10
#define LAYER_RightMiddy 11
#define LAYER_RightRingy 12
#define LAYER_RightPinky 13
#define LAYER_Gaming 14
#define LAYER_Cursor 15
#define LAYER_Number 16
#define LAYER_Function 17
#define LAYER_macOS_left 18
#define LAYER_Symbol 19
#define LAYER_Mouse 20
#define LAYER_System 21
#define LAYER_macOS_right 22
#define LAYER_Emoji 23
#define LAYER_World 24
#define LAYER_Factory 25
#define LAYER_Lower 26
#define LAYER_macOS_lower 27
#define LAYER_Mouse_slow 28
#define LAYER_Mouse_fast 29
#define LAYER_Mouse_warp 30
#define LAYER_Magic 31
/* To deal with the situation where there is no Lower layer, to keep &lower happy */
#ifndef LAYER_Lower
#define LAYER_Lower 0
#endif
/* Custom Device-tree */
//////////////////////////////////////////////////////////////////////////////
//
// Per-key RGB indicators for layers & mods -- requires PR36 beta firmware:
// override "EXPERIMENTAL_RGB_LAYER" to "y" in Advanced Configuration and
// select "community.pr36.per-key-rgb" from the drop-down menu located at
// Glove80 Layout Editor > Settings > Advanced Settings > Firmware Version
//
// - https://github.com/moergo-sc/zmk/pull/36
// - https://github.com/moergo-sc/zmk/pull/30
// - https://github.com/zmkfirmware/zmk/pull/2752
// - https://dev.glove80.com/#/layout/user/c42ac32d-dc0d-4160-9ee3-fd0fc15f1725
//
//////////////////////////////////////////////////////////////////////////////
#if __has_include(<dt-bindings/zmk/rgb_colors.h>)
//
// Color definitions with conflict guard to prevent
// accidental redefinition of common abbreviations.
//
#if defined(RED) || defined(RED_RGB) || \
defined(COR) || defined(COR_RGB) || \
defined(ORN) || defined(ORN_RGB) || \
defined(GDN) || defined(GDN_RGB) || \
defined(GOL) || defined(GOL_RGB) || \
defined(YLW) || defined(YLW_RGB) || \
defined(CHU) || defined(CHU_RGB) || \
defined(GRN) || defined(GRN_RGB) || \
defined(SPG) || defined(SPG_RGB) || \
defined(CYN) || defined(CYN_RGB) || \
defined(AZU) || defined(AZU_RGB) || \
defined(TEA) || defined(TEA_RGB) || \
defined(TUR) || defined(TUR_RGB) || \
defined(BLU) || defined(BLU_RGB) || \
defined(PUR) || defined(PUR_RGB) || \
defined(MAJ) || defined(MAJ_RGB) || \
defined(PNK) || defined(PNK_RGB) || \
defined(WHT) || defined(WHT_RGB) || \
defined(BLK) || defined(BLK_RGB) || \
defined(___) || \
defined(DUG) || defined(DUG_RGB) || \
defined(LAC) || defined(LAC_RGB) || \
defined(BSL) || defined(BNL) || defined(BCL) || \
defined(SSL) || defined(SNL) || defined(SCL) || \
defined(FST) || defined(WRP) || defined(SLO)
#error "Naming conflict: 3-letter color abbreviation already defined!"
#endif
//
// color definitions from QMK
// https://github.com/qmk/qmk_firmware/blob/master/quantum/color.h
//
#define RED_RGB 0xFF0000 // #FF0000 RED => RED (red)
#define COR_RGB 0xFF7C4D // #FF7C4D CORAL => COR (coral)
#define ORN_RGB 0xFF8000 // #FF8000 ORANGE => ORN (ornj)
#define GDN_RGB 0xD9A521 // #D9A521 GOLDNROD => GDN (gold'nrod)
#define GOL_RGB 0xFFD900 // #FFD900 GOLD => GOL (gold)
#define YLW_RGB 0xFFFF00 // #FFFF00 YELLOW => YLW (yellow)
#define CHU_RGB 0x80FF00 // #80FF00 CHARTRSE => CHU (chartreuse)
#define GRN_RGB 0x00FF00 // #00FF00 GREEN => GRN (green)
#define SPG_RGB 0x00FF80 // #00FF80 SPRINGRN => SPG (spring green)
#define CYN_RGB 0x00FFFF // #00FFFF CYAN => CYN (sigh-an)
#define AZU_RGB 0x99F5FF // #99F5FF AZURE => AZU (a-zur)
#define TEA_RGB 0x008080 // #008080 TEAL => TEA (teel)
#define TUR_RGB 0x476E6A // #476E6A TURQUOIS => TUR (turquoise)
#define BLU_RGB 0x0000FF // #0000FF BLUE => BLU (bloo)
#define PUR_RGB 0x7A00FF // #7A00FF PURPLE => PUR (purp)
#define MAJ_RGB 0xFF00FF // #FF00FF MAGENTA => MAJ (mah-jenta)
#define PNK_RGB 0xFF80BF // #FF80BF PINK => PNK (pink)
#define WHT_RGB 0xFFFFFF // #FFFFFF WHITE => WHT (white)
#define BLK_RGB 0x000000 // #000000 BLACK => BLK (blak)
//
// color definitions from MoErgo
// https://github.com/moergo-sc/zmk/blob/aca523dfce9b6447ffd19d833b791d44f1f286de/app/src/rgb_underglow.c#L259-L265
//
#define DUG_RGB 0x00ff68 // #00ff68 DULL_GRN => DUG (dull green)
#define LAC_RGB 0x6b1fce // #6b1fce LILAC => LAC (lilac)
//
// underglow for the colors above
//
#define RED &ug RED_RGB
#define COR &ug COR_RGB
#define ORN &ug ORN_RGB
#define GDN &ug GDN_RGB
#define GOL &ug GOL_RGB
#define YLW &ug YLW_RGB
#define CHU &ug CHU_RGB
#define GRN &ug GRN_RGB
#define SPG &ug SPG_RGB
#define CYN &ug CYN_RGB
#define AZU &ug AZU_RGB
#define TEA &ug TEA_RGB
#define TUR &ug TUR_RGB
#define BLU &ug BLU_RGB
#define PUR &ug PUR_RGB
#define MAJ &ug MAJ_RGB
#define PNK &ug PNK_RGB
#define WHT &ug WHT_RGB
#define BLK &ug BLK_RGB
#define ___ &ug BLK_RGB
#define DUG &ug DUG_RGB
#define LAC &ug LAC_RGB
//
// underglow for keyboard locks on the Base layer
//
#define BSL &ug_sl LAC_RGB WHT_RGB // ScrollLock COLOR_OFF COLOR_ON
#define BNL &ug_nl LAC_RGB WHT_RGB // NumLock COLOR_OFF COLOR_ON
#define BCL &ug_cl BLK_RGB WHT_RGB // CapsLock COLOR_OFF COLOR_ON
//
// underglow for keyboard locks on the System layer
//
#define SSL &ug_sl BLK_RGB WHT_RGB // ScrollLock COLOR_OFF COLOR_ON
#define SNL &ug_nl BLK_RGB WHT_RGB // NumLock COLOR_OFF COLOR_ON
#define SCL &ug_cl BLK_RGB WHT_RGB // CapsLock COLOR_OFF COLOR_ON
//
// colors for mouse speed scaling in Mouse layers
//
#define FST GOL
#define SLO PNK
#define WRP CHU
// ==== PER-KEY-RGB <section begins> ====
/ {
underglow-layer {
compatible = "zmk,underglow-layer";
/*
Template {
bindings = <
___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
>;
layer-id = <LAYER_Template>;
};
*/
BaseLayer {
bindings = <
___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ MAJ CYN GRN YLW ___ ___ YLW GRN CYN MAJ ___
YLW ___ ___ ___ ___ ___ LAC COR ___ ___ COR LAC ___ ___ ___ ___ ___ YLW
___ ___ ___ ___ LAC BSL BNL BCL ___ LAC LAC LAC ___ ___ ___ ___
>;
layer-id = <0>;
};
#ifdef LAYER_macOS
macOS {
bindings = <
___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ GRN CYN MAJ YLW ___ ___ YLW MAJ CYN GRN ___
YLW ___ ___ ___ ___ ___ LAC COR ___ ___ COR LAC ___ ___ ___ ___ ___ YLW
RED RED ___ ___ LAC BSL BNL BCL ___ LAC LAC LAC ___ ___ RED RED
>;
layer-id = <LAYER_macOS>;
};
#endif
#ifdef LAYER_LeftPinky
LeftPinky {
bindings = <
___ MAJ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ MAJ CYN GRN YLW ___ ___ YLW GRN CYN MAJ ___
YLW ___ ___ ___ ___ ___ LAC COR ___ ___ COR LAC ___ ___ ___ ___ ___ YLW
___ ___ ___ ___ LAC BSL BNL BCL ___ LAC LAC LAC ___ ___ ___ ___
>;
layer-id = <LAYER_LeftPinky>;
};
#endif
#ifdef LAYER_LeftRingy
LeftRingy {
bindings = <
___ ___ CYN ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ MAJ CYN GRN YLW ___ ___ YLW GRN CYN MAJ ___
YLW ___ ___ ___ ___ ___ LAC COR ___ ___ COR LAC ___ ___ ___ ___ ___ YLW
___ ___ ___ ___ LAC BSL BNL BCL ___ LAC LAC LAC ___ ___ ___ ___
>;
layer-id = <LAYER_LeftRingy>;
};
#endif
#ifdef LAYER_LeftMiddy
LeftMiddy {
bindings = <
___ ___ ___ GRN ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ MAJ CYN GRN YLW ___ ___ YLW GRN CYN MAJ ___
YLW ___ ___ ___ ___ ___ LAC COR ___ ___ COR LAC ___ ___ ___ ___ ___ YLW
___ ___ ___ ___ LAC BSL BNL BCL ___ LAC LAC LAC ___ ___ ___ ___
>;
layer-id = <LAYER_LeftMiddy>;
};
#endif
#ifdef LAYER_LeftIndex
LeftIndex {
bindings = <
___ ___ ___ ___ YLW ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ MAJ CYN GRN YLW ___ ___ YLW GRN CYN MAJ ___
YLW ___ ___ ___ ___ ___ LAC COR ___ ___ COR LAC ___ ___ ___ ___ ___ YLW
___ ___ ___ ___ LAC BSL BNL BCL ___ LAC LAC LAC ___ ___ ___ ___
>;
layer-id = <LAYER_LeftIndex>;
};
#endif
#ifdef LAYER_RightIndex
RightIndex {
bindings = <
___ ___ ___ ___ ___ YLW ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ MAJ CYN GRN YLW ___ ___ YLW GRN CYN MAJ ___
YLW ___ ___ ___ ___ ___ LAC COR ___ ___ COR LAC ___ ___ ___ ___ ___ YLW
___ ___ ___ ___ LAC BSL BNL BCL ___ LAC LAC LAC ___ ___ ___ ___
>;
layer-id = <LAYER_RightIndex>;
};
#endif
#ifdef LAYER_RightMiddy
RightMiddy {
bindings = <
___ ___ ___ ___ ___ ___ GRN ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ MAJ CYN GRN YLW ___ ___ YLW GRN CYN MAJ ___
YLW ___ ___ ___ ___ ___ LAC COR ___ ___ COR LAC ___ ___ ___ ___ ___ YLW
___ ___ ___ ___ LAC BSL BNL BCL ___ LAC LAC LAC ___ ___ ___ ___
>;
layer-id = <LAYER_RightMiddy>;
};
#endif
#ifdef LAYER_RightRingy
RightRingy {
bindings = <
___ ___ ___ ___ ___ ___ ___ CYN ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ MAJ CYN GRN YLW ___ ___ YLW GRN CYN MAJ ___
YLW ___ ___ ___ ___ ___ LAC COR ___ ___ COR LAC ___ ___ ___ ___ ___ YLW
___ ___ ___ ___ LAC BSL BNL BCL ___ LAC LAC LAC ___ ___ ___ ___
>;
layer-id = <LAYER_RightRingy>;
};
#endif
#ifdef LAYER_RightPinky
RightPinky {
bindings = <
___ ___ ___ ___ ___ ___ ___ ___ MAJ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ MAJ CYN GRN YLW ___ ___ YLW GRN CYN MAJ ___
YLW ___ ___ ___ ___ ___ LAC COR ___ ___ COR LAC ___ ___ ___ ___ ___ YLW
___ ___ ___ ___ LAC BSL BNL BCL ___ LAC LAC LAC ___ ___ ___ ___
>;
layer-id = <LAYER_RightPinky>;
};
#endif
#ifdef LAYER_Cursor
Cursor {
bindings = <
___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ COR COR COR COR ___ ___ ___ ___ ___ ___ ___
___ COR COR COR COR GDN GDN COR PUR PUR COR ___
YLW MAJ CYN GRN YLW GDN GDN AZU AZU AZU AZU YLW
PNK SPG SPG SPG PUR GDN COR COR ___ SPG SPG SPG GDN AZU AZU AZU AZU PNK
PNK PUR PUR PUR PUR RED ___ ___ SPG SPG SPG PUR PUR PUR PUR PNK
>;
layer-id = <LAYER_Cursor>;
};
#endif
#ifdef LAYER_Number
Number {
bindings = <
___ ___ ___ ___ ___ GDN GDN GDN GDN GDN
___ COR COR COR COR ___ TEA SPG SPG SPG SPG SPG
___ COR COR COR COR GOL TEA GOL GOL GOL SPG SPG
YLW MAJ CYN GRN YLW TEA TEA GOL GOL GOL SPG SPG
GDN SPG SPG SPG PUR GDN ___ ___ ___ SPG SPG SPG TEA GOL GOL GOL SPG SPG
TEA PUR PUR PUR PUR ___ RED ___ SPG SPG GOL SPG SPG SPG SPG SPG
>;
layer-id = <LAYER_Number>;
};
#endif
#ifdef LAYER_Function
Function {
bindings = <
___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ COR COR COR COR ___ AZU AZU AZU AZU AZU AZU
___ COR COR COR COR GDN GDN PNK PNK PNK PNK PNK
YLW MAJ CYN GRN YLW GDN GDN PNK PNK PNK PNK PNK
___ SPG SPG SPG PUR GDN RED ___ ___ AZU BLU BLU GDN PNK PNK PNK PNK PNK
___ PUR PUR PUR PUR ___ ___ ___ AZU AZU AZU CHU CHU CHU CHU CHU
>;
layer-id = <LAYER_Function>;
};
#endif
#ifdef LAYER_Emoji
Emoji {
bindings = <
___ ___ ___ ___ ___ CYN ___ ___ CYN ___
___ ___ ___ ___ ___ ___ ___ CYN ___ ___ CYN ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ GDN PNK SPG AZU ___ CYN ___ ___ ___ ___ CYN
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ CYN ___ ___ CYN ___
___ ___ ___ ___ RED YLW ___ ___ ___ ___ ___ ___ CYN CYN ___ ___
>;
layer-id = <LAYER_Emoji>;
};
#endif
#ifdef LAYER_Symbol
Symbol {
bindings = <
___ ___ ___ ___ ___ ___ ___ ___ ___ ___
COR PNK AZU AZU CHU CHU ___ ___ ___ ___ ___ ___
PUR AZU AZU AZU AZU GDN CHU COR COR COR COR ___
GDN GDN SPG BLU GDN GDN CHU COR COR COR COR ___
PUR SPG SPG SPG SPG GDN PUR CHU GDN ___ ___ ___ CHU PNK PNK PNK PUR YLW
COR BLU PNK PNK BLU GDN GDN GDN ___ ___ RED YLW GRN CYN MAJ ___
>;
layer-id = <LAYER_Symbol>;
};
#endif
#ifdef LAYER_Mouse
Mouse {
bindings = <
___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ SPG AZU SPG ___ GDN GDN GDN GDN GDN ___
___ SPG AZU AZU AZU SPG SPG FST WRP SLO PUR SPG
___ SPG SLO WRP FST SPG GDN PUR GDN BLU BLU BLU SPG AZU AZU AZU AZU SPG
___ ___ BLU BLU BLU GDN GDN GDN ___ RED ___ YLW GRN CYN MAJ ___
>;
layer-id = <LAYER_Mouse>;
};
#endif
#ifdef LAYER_Mouse_fast
Mouse_fast {
bindings = <
___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ SPG FST SPG ___ GDN GDN GDN GDN GDN ___
___ SPG FST FST FST SPG SPG FST WRP SLO PUR GDN
___ SPG FST FST FST SPG GDN PUR GDN BLU BLU BLU SPG FST FST FST FST GDN
___ ___ BLU BLU BLU GDN GDN GDN ___ RED ___ YLW GRN CYN MAJ ___
>;
layer-id = <LAYER_Mouse_fast>;
};
#endif
#ifdef LAYER_Mouse_warp
Mouse_warp {
bindings = <
___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ SPG WRP SPG ___ GDN GDN GDN GDN GDN ___
___ SPG WRP WRP WRP SPG SPG FST WRP SLO PUR GDN
___ SPG WRP WRP WRP SPG GDN PUR GDN BLU BLU BLU SPG WRP WRP WRP WRP GDN
___ ___ BLU BLU BLU GDN GDN GDN ___ RED ___ YLW GRN CYN MAJ ___
>;
layer-id = <LAYER_Mouse_warp>;
};
#endif
#ifdef LAYER_Mouse_slow
Mouse_slow {
bindings = <
___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ SPG SLO SPG ___ GDN GDN GDN GDN GDN ___
___ SPG SLO SLO SLO SPG SPG FST WRP SLO PUR GDN
___ SPG SLO SLO SLO SPG GDN PUR GDN BLU BLU BLU SPG SLO SLO SLO SLO GDN
___ ___ BLU BLU BLU GDN GDN GDN ___ RED ___ YLW GRN CYN MAJ PUR
>;
layer-id = <LAYER_Mouse_slow>;
};
#endif
#ifdef LAYER_System
System {
bindings = <
___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ PNK AZU SPG GDN COR COR GDN SPG AZU PNK ___
___ PNK AZU SPG GDN COR COR GDN SPG AZU PNK ___
___ ___ BLU BLU BLU COR PUR PUR PUR ___ ORN RED COR SSL SNL SCL PUR PUR
___ ___ ___ ___ ORN SSL SNL SCL BLU BLU BLU YLW GRN CYN MAJ PUR
>;
layer-id = <LAYER_System>;
};
#endif
#ifdef LAYER_World
World {
bindings = <
___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ SPG AZU AZU AZU ___ ___ ___ CYN CYN ___ ___
AZU AZU AZU AZU AZU ___ ___ YLW GRN GRN YLW ___
AZU AZU SPG SPG AZU ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
SPG SPG SPG SPG SPG ___ ___ ___ ___ ___ ___ RED ___ ___ ___ ___
>;
layer-id = <LAYER_World>;
};
#endif
#ifdef LAYER_Typing
Typing {
bindings = <
___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ RED ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ RED ___ ___ ___ ___
>;
layer-id = <LAYER_Typing>;
};
#endif
#ifdef LAYER_Gaming
Gaming {
bindings = <
ORN ___ ___ ___ COR TEA TEA TEA TEA TEA
___ GDN GDN GDN GDN GDN TEA TEA TEA TEA TEA TEA
___ GDN GDN GDN GDN GDN ___ ___ ___ ___ ___ TEA
___ COR ___ AZU ___ ___ ___ ___ ___ ___ ___ ___
___ YLW AZU AZU AZU RED YLW CYN ___ ORN AZU COR ___ ___ ___ ___ ___ ___
___ GRN ___ ___ RED COR GRN COR AZU AZU AZU ___ ___ ___ ___ ___
>;
layer-id = <LAYER_Gaming>;
};
#endif
#ifdef LAYER_Lower
Lower {
bindings = <
___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ GOL GOL GOL GOL GOL GOL GOL GOL GOL GOL ___
___ MAJ CYN GRN YLW SPG SPG YLW GRN CYN MAJ ___
___ SPG SPG SPG SPG SPG RED ___ BLU BLU ___ RED SPG PNK PNK SPG PNK ___
___ ___ ___ ___ RED RED RED COR COR RED RED RED ___ ___ ___ ___
>;
layer-id = <LAYER_Lower>;
};
#endif
#ifdef LAYER_Factory
Factory {
bindings = <
___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___ ___ ___ ___ RED ___ ___ ___ ___ ___ ___ ___ ___ ___
RED ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
>;
layer-id = <LAYER_Factory>;
};
#endif
};
};
// ==== PER-KEY-RGB <section ends> =====
#undef RED
#undef RED_RGB
#undef COR
#undef COR_RGB
#undef ORN
#undef ORN_RGB
#undef GDN
#undef GDN_RGB
#undef GOL
#undef GOL_RGB
#undef YLW
#undef YLW_RGB
#undef CHU
#undef CHU_RGB
#undef GRN
#undef GRN_RGB
#undef SPG
#undef SPG_RGB
#undef CYN
#undef CYN_RGB
#undef AZU
#undef AZU_RGB
#undef TEA
#undef TEA_RGB
#undef TUR
#undef TUR_RGB
#undef BLU
#undef BLU_RGB
#undef PUR
#undef PUR_RGB
#undef MAJ
#undef MAJ_RGB
#undef PNK
#undef PNK_RGB
#undef WHT
#undef WHT_RGB
#undef BLK
#undef BLK_RGB
#undef ___
#undef DUG
#undef DUG_RGB
#undef LAC
#undef LAC_RGB
#undef BSL
#undef BNL
#undef BCL
#undef SSL
#undef SNL
#undef SCL
#undef FST
#undef WRP
#undef SLO
#endif
/* Input Listeners */
/* System behavior and Macros */
/ {
behaviors {
ZMK_TD_LAYER(lower, LAYER_Lower)
};
};
/ {
macros {
rgb_ug_status_macro: rgb_ug_status_macro {
label = "RGB_UG_STATUS";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings
= <&rgb_ug RGB_STATUS>;
};
};
};
/ {
#ifdef BT_DISC_CMD
behaviors {
bt_0: bt_0 {
compatible = "zmk,behavior-tap-dance";
label = "BT_0";
#binding-cells = <0>;
tapping-term-ms = <200>;
bindings = <&bt_select_0>, <&bt BT_DISC 0>;
};
bt_1: bt_1 {
compatible = "zmk,behavior-tap-dance";
label = "BT_1";
#binding-cells = <0>;
tapping-term-ms = <200>;
bindings = <&bt_select_1>, <&bt BT_DISC 1>;
};
bt_2: bt_2 {
compatible = "zmk,behavior-tap-dance";
label = "BT_2";
#binding-cells = <0>;
tapping-term-ms = <200>;
bindings = <&bt_select_2>, <&bt BT_DISC 2>;
};
bt_3: bt_3 {
compatible = "zmk,behavior-tap-dance";
label = "BT_3";
#binding-cells = <0>;
tapping-term-ms = <200>;
bindings = <&bt_select_3>, <&bt BT_DISC 3>;
};
};
macros {
bt_select_0: bt_select_0 {
label = "BT_SELECT_0";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings
= <&out OUT_BLE>,
<&bt BT_SEL 0>;
};
bt_select_1: bt_select_1 {
label = "BT_SELECT_1";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings
= <&out OUT_BLE>,
<&bt BT_SEL 1>;
};
bt_select_2: bt_select_2 {
label = "BT_SELECT_2";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings
= <&out OUT_BLE>,
<&bt BT_SEL 2>;
};
bt_select_3: bt_select_3 {
label = "BT_SELECT_3";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings
= <&out OUT_BLE>,
<&bt BT_SEL 3>;
};
};
#else
macros {
bt_0: bt_0 {
label = "BT_0";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings
= <&out OUT_BLE>,
<&bt BT_SEL 0>;
};
bt_1: bt_1 {
label = "BT_1";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings
= <&out OUT_BLE>,
<&bt BT_SEL 1>;
};
bt_2: bt_2 {
label = "BT_2";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings
= <&out OUT_BLE>,
<&bt BT_SEL 2>;
};
bt_3: bt_3 {
label = "BT_3";
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings
= <&out OUT_BLE>,
<&bt BT_SEL 3>;
};
};
#endif
};
/ {
behaviors {
magic: magic {
compatible = "zmk,behavior-hold-tap";
label = "MAGIC_HOLD_TAP";
#binding-cells = <2>;
flavor = "tap-preferred";
tapping-term-ms = <200>;
bindings = <&mo>, <&rgb_ug_status_macro>;
};
};
};
/* Key positions */
#define POS_LH_C6R1 0
#define POS_LH_C5R1 1
#define POS_LH_C4R1 2
#define POS_LH_C3R1 3
#define POS_LH_C2R1 4
#define POS_RH_C2R1 5
#define POS_RH_C3R1 6
#define POS_RH_C4R1 7
#define POS_RH_C5R1 8
#define POS_RH_C6R1 9
#define POS_LH_C6R2 10
#define POS_LH_C5R2 11
#define POS_LH_C4R2 12
#define POS_LH_C3R2 13
#define POS_LH_C2R2 14
#define POS_LH_C1R2 15
#define POS_RH_C1R2 16
#define POS_RH_C2R2 17
#define POS_RH_C3R2 18
#define POS_RH_C4R2 19
#define POS_RH_C5R2 20
#define POS_RH_C6R2 21
#define POS_LH_C6R3 22
#define POS_LH_C5R3 23
#define POS_LH_C4R3 24
#define POS_LH_C3R3 25
#define POS_LH_C2R3 26
#define POS_LH_C1R3 27
#define POS_RH_C1R3 28
#define POS_RH_C2R3 29
#define POS_RH_C3R3 30
#define POS_RH_C4R3 31
#define POS_RH_C5R3 32
#define POS_RH_C6R3 33
#define POS_LH_C6R4 34
#define POS_LH_C5R4 35
#define POS_LH_C4R4 36
#define POS_LH_C3R4 37
#define POS_LH_C2R4 38
#define POS_LH_C1R4 39
#define POS_RH_C1R4 40
#define POS_RH_C2R4 41
#define POS_RH_C3R4 42
#define POS_RH_C4R4 43
#define POS_RH_C5R4 44
#define POS_RH_C6R4 45
#define POS_LH_C6R5 46
#define POS_LH_C5R5 47
#define POS_LH_C4R5 48
#define POS_LH_C3R5 49
#define POS_LH_C2R5 50
#define POS_LH_C1R5 51
#define POS_LH_T1 52
#define POS_LH_T2 53
#define POS_LH_T3 54
#define POS_RH_T3 55
#define POS_RH_T2 56
#define POS_RH_T1 57
#define POS_RH_C1R5 58
#define POS_RH_C2R5 59
#define POS_RH_C3R5 60
#define POS_RH_C4R5 61
#define POS_RH_C5R5 62
#define POS_RH_C6R5 63
#define POS_LH_C6R6 64
#define POS_LH_C5R6 65
#define POS_LH_C4R6 66
#define POS_LH_C3R6 67
#define POS_LH_C2R6 68
#define POS_LH_T4 69
#define POS_LH_T5 70
#define POS_LH_T6 71
#define POS_RH_T6 72
#define POS_RH_T5 73
#define POS_RH_T4 74
#define POS_RH_C2R6 75
#define POS_RH_C3R6 76
#define POS_RH_C4R6 77
#define POS_RH_C5R6 78
#define POS_RH_C6R6 79
/* Custom Defined Behaviors */
/ {
// NOTE: Use the many #define settings below to customize this keymap!
#define OPERATING_SYSTEM 'L' // choose 'L'inux, 'M'acOS, or 'W'indows
#define DIFFICULTY_LEVEL 0 // 0:custom, 1:easy -> 5:hard (see below)
#define ENABLE_MOUSE_KEYS // requires HID_POINTING override to "y"
#define ENFORCE_BILATERAL // cancels single-handed home row mod+tap
//#define SPACE_FORGIVENESS // allow lingering taps on the space bar
//#define THUMB_FORGIVENESS // allow lingering taps on the thumb keys
//#define SHIFT_FORGIVENESS // requires v24.08-beta or newer firmware
//#define NATURAL_SCROLLING // supports "natural scrolling" in macOS
//#define WORLD_USE_COMPOSE // use native Compose in place of Unicode
//#define WORLD_HOST_AZERTY // host computer is set to AZERTY locale
//#define WORLD_SHIFT_NUMBER // apply Shift to type number row digits
// TIP: Add more setting overrides here instead of editing them below.
//////////////////////////////////////////////////////////////////////////////
//
// Sunaku's Keymap v52 -- "Glorious Engrammer"
// - https://github.com/sunaku/glove80-keymaps
//
//////////////////////////////////////////////////////////////////////////////
//
// OPERATING_SYSTEM defines which operating system you intend to use
// with this keymap, because shortcuts vary across operating systems.
//
// - https://zmk.dev/docs/codes
// - https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts
//
// This setting also affects the UNICODE() function defined below, as
// each OS has different shortcuts for typing Unicode hex characters.
//
// NOTE: You may need to enable Unicode hexadecimal input in your OS:
// - (macOS) https://uknowit.uwgb.edu/page.php?id=22623
// and https://github.com/ldanet/unicode-hex-input-fix
// - (Linux) https://help.ubuntu.com/stable/ubuntu-help/tips-specialchars.html.en#ctrlshiftu
// - (Windows) https://github.com/samhocevar/wincompose
//
// Specifically, Windows users should be running the WinCompose tool,
// which lets you type Unicode characters via hexadecimal codepoints.
//
#ifndef OPERATING_SYSTEM
#define OPERATING_SYSTEM 'L' // linux
//#define OPERATING_SYSTEM 'M' // macos
//#define OPERATING_SYSTEM 'W' // windows
#endif
#if OPERATING_SYSTEM == 'M'
#define _C LG
#define _A_TAB LGUI
#define _G_TAB LALT
#define _REDO LG(LS(Z))
#define _POWER K_POWER
#define _WORD LA
#define _HOME LG(LEFT)
#define _END LG(RIGHT)
#define _EMOJI LG(LC(SPACE))
#define _FILES LS(LA(M))
#define _GLOBE GLOBE
#else
#define _C LC
#define _A_TAB LALT
#define _G_TAB LGUI
#define _REDO LC(Y)
#define _POWER C_POWER
#define _WORD LC
#define _HOME HOME
#define _END END
#define _EMOJI LG(DOT)
#define _FILES LG(E)
#define _GLOBE LGUI
#endif
#define _SLEEP C_SLEEP
#if OPERATING_SYSTEM == 'W'
#define _LOCK LG(L)
#elif OPERATING_SYSTEM == 'M'
#define _LOCK _C(LC(Q))
#elif OPERATING_SYSTEM == 'L'
#define _LOCK K_LOCK
#endif
#define _UNDO _C(Z)
#define _CUT _C(X)
#define _COPY _C(C)
#define _PASTE _C(V)
#define _FIND _C(F)
#define _FIND_NEXT _C(G)
#define _FIND_PREV _C(LS(G))
//
// Keymap specific knowledge of the base layer's alpha + ZMK layout
//
#if defined(LAYER_Enthium) && LAYER_Enthium == 0
#define KEY_LH_C6R1 0
#define KEY_LH_C5R1 0
#define KEY_LH_C4R1 0
#define KEY_LH_C3R1 0
#define KEY_LH_C2R1 0
#define KEY_RH_C2R1 0
#define KEY_RH_C3R1 0
#define KEY_RH_C4R1 0
#define KEY_RH_C5R1 0
#define KEY_RH_C6R1 0
#define KEY_LH_C6R2 0
#define KEY_LH_C5R2 N1
#define KEY_LH_C4R2 N2
#define KEY_LH_C3R2 N3
#define KEY_LH_C2R2 N4
#define KEY_LH_C1R2 N5
#define KEY_RH_C1R2 N6
#define KEY_RH_C2R2 N7
#define KEY_RH_C3R2 N8
#define KEY_RH_C4R2 N9
#define KEY_RH_C5R2 N0
#define KEY_RH_C6R2 0
#define KEY_LH_C6R3 0
#define KEY_LH_C5R3 Q
#define KEY_LH_C4R3 Y
#define KEY_LH_C3R3 O
#define KEY_LH_C2R3 U