-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcorne.keymap
880 lines (769 loc) · 41 KB
/
corne.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
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
/* source key position labels */
/* 36 KEY MATRIX / LAYOUT MAPPING
╭────────────────────┬────────────────────╮ ╭─────────────────────┬─────────────────────╮
│ 0 1 2 3 4 │ 5 6 7 8 9 │ │ LT4 LT3 LT2 LT1 LT0 │ RT0 RT1 RT2 RT3 RT4 │
│ 10 11 12 13 14 │ 15 16 17 18 19 │ │ LM4 LM3 LM2 LM1 LM0 │ RM0 RM1 RM2 RM3 RM4 │
│ 20 21 22 23 24 │ 25 26 27 28 29 │ │ LB4 LB3 LB2 LB1 LB0 │ RB0 RB1 RB2 RB3 RB4 │
╰───────╮ 30 31 32 │ 33 34 35 ╭───────╯ ╰───────╮ LH2 LH1 LH0 │ RH0 RH1 RH2 ╭───────╯
╰────────────┴────────────╯ ╰─────────────┴─────────────╯ */
#define LT0 4 // left-top row
#define LT1 3
#define LT2 2
#define LT3 1
#define LT4 0
#define RT0 5 // right-top row
#define RT1 6
#define RT2 7
#define RT3 8
#define RT4 9
#define LM0 14 // left-middle row
#define LM1 13
#define LM2 12
#define LM3 11
#define LM4 10
#define RM0 15 // right-middle row
#define RM1 16
#define RM2 17
#define RM3 18
#define RM4 19
#define LB0 24 // left-bottom row
#define LB1 23
#define LB2 22
#define LB3 21
#define LB4 20
#define RB0 25 // right-bottom row
#define RB1 26
#define RB2 27
#define RB3 28
#define RB4 29
#define LH0 32 // left thumb keys
#define LH1 31
#define LH2 30
#define RH0 33 // right thumb keys
#define RH1 34
#define RH2 35
#define KEYS_L LT0 LT1 LT2 LT3 LT4 LM0 LM1 LM2 LM3 LM4 LB0 LB1 LB2 LB3 LB4 // left hand
#define KEYS_R RT0 RT1 RT2 RT3 RT4 RM0 RM1 RM2 RM3 RM4 RB0 RB1 RB2 RB3 RB4 // right hand
#define THUMBS LH2 LH1 LH0 RH0 RH1 RH2 // thumbs
/* activate bluetooth */
#define CONFIG_WIRELESS 1
#include <behaviors.dtsi>
#include <behaviors/num_word.dtsi> // requires auto-layer module
#include <dt-bindings/zmk/keys.h>
#if CONFIG_WIRELESS
#include <dt-bindings/zmk/bt.h>
#define _BT_SEL_KEYS_ &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_CLR
#else
#define _BT_SEL_KEYS_ &trans &trans &trans &trans &trans
#endif
// #define BASE 0
// #define HMR 1
// #define NAV 2
// #define FN 3
// #define NUM 4
// #define MOUSE 5
// #define BDO 6
// #define BDONUM 7
// #define BDOXTRA 8
#define ZMK_MOUSE_DEFAULT_MOVE_VAL 1500 // 600
#define ZMK_MOUSE_DEFAULT_SCRL_VAL 20 // 10
#include <dt-bindings/zmk/mouse.h>
#define U_MS_U &mmv MOVE_UP
#define U_MS_D &mmv MOVE_DOWN
#define U_MS_L &mmv MOVE_LEFT
#define U_MS_R &mmv MOVE_RIGHT
#define U_WH_U &msc SCRL_UP
#define U_WH_D &msc SCRL_DOWN
#define U_WH_L &msc SCRL_LEFT
#define U_WH_R &msc SCRL_RIGHT
#define XXX &none
#define ___ &trans
#define QUICK_TAP_MS 175
#define COMBO_TERM_FAST 18
#define COMBO_TERM_SLOW 30
#define COMBO_IDLE_FAST 175
#define COMBO_IDLE_SLOW 50
// make homerow combos tap-only (so HRMs can be chorded instantaneously)
#define HRC_TAB &hml LS(LALT) TAB
#define HRC_REPEAT &hml_repeat LS(LCTRL) 0
#define HRC_LPAR &hmr_lpar_lt RS(LCTRL) 0
#define HRC_RPAR &hmr_rpar_gt RS(LALT) 0
#define SMART_NUM &smart_num 4 0
#define NAV_LEFT &mt_home 0 LEFT // tap: left | long-tap: beginning of line
#define NAV_RIGHT &mt_end 0 RIGHT // tap: right | long-tap: end of line
#define NAV_UP &mt LC(HOME) UP // tap: up | long-tap: beginning of document
#define NAV_DOWN &mt LC(END) DOWN // tap: down | long-tap: end of document
#define NAV_BSPC &mt LC(BSPC) BSPC // tap: bspc | long-tap: delete word backward
#define NAV_DEL &mt LC(DEL) DEL // tap: del | long-tap: delete word forward
#define CANCEL &kp K_CANCEL // cancel caps-word, num-word and smart-mouse
#define DSK_PREV &hmr LCTRL LG(LC(LEFT)) // previous desktop
#define DSK_NEXT &hmr LALT LG(LC(RIGHT)) // next desktop
#define PIN_WIN &kp LG(LC(LS(Q))) // pin window across desktops
#define PIN_APP &kp LG(LC(LS(A))) // pin application across desktops
#define DSK_MNGR &kp LA(GRAVE) // desktop manager
#define VOL_DOWN &hmr RSHFT C_VOL_DN
&sk { // sticky-key config
release-after-ms = <900>; // release after 0.6s
quick-release; // no double capitalization when rolling keys
};
&sl { // sticky-layer config
ignore-modifiers; // allow chording sticky mods & layers
};
< { // layer-tap config
flavor = "balanced";
tapping-term-ms = <200>;
quick-tap-ms = <QUICK_TAP_MS>;
};
&mt { // MT_CORE long-tap action on hold, short-tap action on all interrupts
flavor = "tap-preferred";
tapping-term-ms = <220>;
quick-tap-ms = <220>;
hold-trigger-key-positions = <0>;
};
&mmv {
acceleration-exponent = <1>; // 1
time-to-max-speed-ms = <500>; // 40
delay-ms = <0>; // 0
};
&msc {
acceleration-exponent = <1>; // 0
time-to-max-speed-ms = <40>; // 500
delay-ms = <0>; // 10
};
&caps_word { // mods deactivate caps-word, requires PR #1451
/delete-property/ ignore-modifiers;
};
/ {
behaviors {
hml: hml {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "balanced";
tapping-term-ms = <280>;
quick-tap-ms = <QUICK_TAP_MS>;
require-prior-idle-ms = <250>;
bindings = <&kp>, <&kp>;
hold-trigger-key-positions = <KEYS_R THUMBS>;
hold-trigger-on-release;
};
hmr: hmr {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "balanced";
tapping-term-ms = <280>;
quick-tap-ms = <QUICK_TAP_MS>;
require-prior-idle-ms = <250>;
bindings = <&kp>, <&kp>;
hold-trigger-key-positions = <KEYS_L THUMBS>;
hold-trigger-on-release;
};
hml_repeat: hml_repeat {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "balanced";
tapping-term-ms = <280>;
quick-tap-ms = <QUICK_TAP_MS>;
require-prior-idle-ms = <250>;
bindings = <&kp>, <&key_repeat>;
hold-trigger-key-positions = <KEYS_R THUMBS>;
hold-trigger-on-release;
};
hmr_lpar_lt: hmr_lpar_lt {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "balanced";
tapping-term-ms = <280>;
quick-tap-ms = <QUICK_TAP_MS>;
require-prior-idle-ms = <250>;
bindings = <&kp>, <&lpar_lt>;
hold-trigger-key-positions = <KEYS_L THUMBS>;
hold-trigger-on-release;
};
hmr_rpar_gt: hmr_rpar_gt {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "balanced";
tapping-term-ms = <280>;
quick-tap-ms = <QUICK_TAP_MS>;
require-prior-idle-ms = <250>;
bindings = <&kp>, <&rpar_gt>;
hold-trigger-key-positions = <KEYS_L THUMBS>;
hold-trigger-on-release;
};
mt_home: mt_home {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "tap-preferred";
tapping-term-ms = <220>;
quick-tap-ms = <220>;
hold-trigger-key-positions = <0>;
bindings = <&masked_home>, <&kp>;
};
mt_end: mt_end {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "tap-preferred";
tapping-term-ms = <220>;
quick-tap-ms = <220>;
hold-trigger-key-positions = <0>;
bindings = <&masked_end>, <&kp>;
};
masked_home: masked_home {
compatible = "zmk,behavior-mod-morph";
#binding-cells = <0>;
bindings = <&kp HOME>, <&kp HOME>;
mods = <(MOD_LCTL)>;
};
masked_end: masked_end {
compatible = "zmk,behavior-mod-morph";
#binding-cells = <0>;
bindings = <&kp END>, <&kp END>;
mods = <(MOD_LCTL)>;
};
/* Caps-word, num-word and smart-mouse */
// tap: sticky-shift | shift + tap/ double-tap: caps-word | hold: shift
smart_shft: smart_shft {
compatible = "zmk,behavior-mod-morph";
#binding-cells = <0>;
bindings = <&sk LSHFT>, <&caps_word>;
mods = <(MOD_LSFT)>;
};
// tap: num-word | double-tap: sticky num-layer | hold: num-layer
smart_num: smart_num {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "balanced";
tapping-term-ms = <200>;
quick-tap-ms = <QUICK_TAP_MS>;
bindings = <&mo>, <&num_dance>;
};
num_dance: num_dance {
compatible = "zmk,behavior-tap-dance";
#binding-cells = <0>;
bindings = <&num_word 4>, <&sl 4>; // reverse this for sticky-num on single tap
tapping-term-ms = <200>;
};
// smart-mouse, requires PR #1366
smart_mouse: smart_mouse {
compatible = "zmk,behavior-tri-state";
#binding-cells = <0>;
bindings = <&tog 5>, <&none>, <&tog 5>;
ignored-key-positions = <LT0 LT1 LT2 LT3 LT4 LM0 LM1 LM2 LM3 LM4 LB0 LB1 LB2 LB3 LB4 LH0 RT0 RT1 RT2 RT3 RT4 RM0 RM1 RM2 RM3 RM4 RB0 RB1 RB2 RB3 RB4 RH0>;
ignored-layers = <5>;
};
/* Custom behaviors */
// Alt+Tab swapper, requires PR #1366
swapper: swapper {
compatible = "zmk,behavior-tri-state";
#binding-cells = <0>;
bindings = <&kt LALT>, <&kp TAB>, <&kt LALT>;
ignored-key-positions = <LT2>;
};
// tap: comma | shift + tap: semicolon | ctrl + shift + tap: <
comma_morph: comma_morph {
compatible = "zmk,behavior-mod-morph";
#binding-cells = <0>;
bindings = <&kp COMMA>, <&comma_inner_morph>;
mods = <(MOD_LSFT|MOD_RSFT)>;
};
comma_inner_morph: comma_inner_morph {
compatible = "zmk,behavior-mod-morph";
#binding-cells = <0>;
bindings = <&kp SEMICOLON>, <&kp LESS_THAN>;
mods = <(MOD_LCTL|MOD_RCTL)>;
};
// tap: dot | shift + tap: colon | ctrl + shift + tap: >
dot_morph: dot_morph {
compatible = "zmk,behavior-mod-morph";
#binding-cells = <0>;
bindings = <&kp DOT>, <&dot_inner_morph>;
mods = <(MOD_LSFT|MOD_RSFT)>;
};
dot_inner_morph: dot_inner_morph {
compatible = "zmk,behavior-mod-morph";
#binding-cells = <0>;
bindings = <&kp COLON>, <&kp GREATER_THAN>;
mods = <(MOD_LCTL|MOD_RCTL)>;
};
// tap: qmark | shift + tap: excl
qexcl: qexcl {
compatible = "zmk,behavior-mod-morph";
#binding-cells = <0>;
bindings = <&kp QMARK>, <&kp EXCL>;
mods = <(MOD_LSFT|MOD_RSFT)>;
};
// tap: left/right parenthesis | shft + tap: less-than/greater-than
lpar_lt: lpar_lt {
compatible = "zmk,behavior-mod-morph";
#binding-cells = <0>;
bindings = <&kp LPAR>, <&kp LT>;
mods = <(MOD_LSFT|MOD_RSFT)>;
};
rpar_gt: rpar_gt {
compatible = "zmk,behavior-mod-morph";
#binding-cells = <0>;
bindings = <&kp RPAR>, <&kp GT>;
mods = <(MOD_LSFT|MOD_RSFT)>;
};
lt_spc: lt_spc {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "balanced";
tapping-term-ms = <300>;
quick-tap-ms = <QUICK_TAP_MS>;
bindings = <&mo>, <&kp>;
};
// tap: space | shift + tap: dot -> space -> sticky shift
spc_morph: spc_morph {
compatible = "zmk,behavior-mod-morph";
#binding-cells = <0>;
bindings = <&kp SPACE>, <&dot_spc>;
mods = <(MOD_LSFT|MOD_RSFT)>;
};
// tap: backspace | lshft + tap: delete | rshft + tap: shift-delete
bs_del: bs_del {
compatible = "zmk,behavior-mod-morph";
#binding-cells = <0>;
bindings = <&kp BSPC>, <&kp DEL>;
mods = <(MOD_LSFT|MOD_RSFT)>;
keep-mods = <MOD_RSFT>;
};
// tap: copy | double-tap: cut
copy_cut: copy_cut {
compatible = "zmk,behavior-tap-dance";
#binding-cells = <0>;
tapping-term-ms = <200>;
bindings = <&kp LC(INS)>, <&kp LC(X)>;
};
};
macros {
sleep: sleep {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
wait-ms = <500>;
tap-ms = <50>;
bindings = <&kp LG(X) &kp U &kp S>;
};
// end sentence
dot_spc: dot_spc {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
wait-ms = <0>;
tap-ms = <5>;
bindings = <&kp DOT &kp SPACE &sk LSHFT>;
};
rename: rename {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings =
<¯o_tap>, <&kp LC(R)>,
<¯o_tap>, <&kp LC(R)>;
};
comment: comment {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings =
<¯o_tap>, <&kp LC(K)>,
<¯o_tap>, <&kp LC(C)>;
};
uncomment: uncomment {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings =
<¯o_tap>, <&kp LC(K)>,
<¯o_tap>, <&kp LC(U)>;
};
cpp_header_hop: cpp_header_hop {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings =
<¯o_tap>, <&kp LC(K)>,
<¯o_tap>, <&kp LC(O)>;
};
search_members: search_members {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings =
<¯o_press>, <&kp LEFT_ALT>,
<¯o_tap>, <&kp BACKSLASH>,
<¯o_release>, <&kp LEFT_ALT>;
};
context_actions: context_actions {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <¯o_tap>, <&kp LA(ENTER)>;
};
run_project: run_project {
compatible = "zmk,behavior-tap-dance";
#binding-cells = <0>;
tapping-term-ms = <350>;
bindings = <&kp F5>, <&kp LA(F5)>;
};
};
combos {
compatible = "zmk,combos";
////////////////////////////////////////////////////// LEFT //////////////////////////////////////////////////////
/* Horizontal combos - left hand */
combo_esc {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp ESC>;
key-positions = <LT4 LT3>;
layers = <0 1 2 4 5>;
require-prior-idle-ms = <COMBO_IDLE_FAST>;
};
combo_ret {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp RETURN>;
key-positions = <LM2 LM1>;
layers = <0 1 2 4 5>;
require-prior-idle-ms = <COMBO_IDLE_FAST>;
};
combo_mouse {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&smart_mouse>;
key-positions = <LT3 LT1>;
layers = <0 1 2 4>;
require-prior-idle-ms = <COMBO_IDLE_FAST>;
};
combo_tab {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp TAB>;
key-positions = <LM4 LM3>;
layers = <0 1 2 4 5>;
require-prior-idle-ms = <COMBO_IDLE_FAST>;
};
combo_repeat {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <HRC_REPEAT>;
key-positions = <LT2 LT1>;
layers = <1 2 4>;
require-prior-idle-ms = <COMBO_IDLE_FAST>;
};
combo_cut {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp LC(X)>;
key-positions = <LB3 LB1>;
layers = <0 1 2 4 5>;
require-prior-idle-ms = <COMBO_IDLE_FAST>;
};
combo_copy {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp LC(C)>;
key-positions = <LB3 LB2>;
layers = <0 1 2 4 5>;
require-prior-idle-ms = <COMBO_IDLE_FAST>;
};
combo_paste {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp LC(V)>;
key-positions = <LB2 LB1>;
layers = <0 1 2 4 5>;
require-prior-idle-ms = <COMBO_IDLE_FAST>;
};
combo_undo {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp LC(Z)>;
key-positions = <LB4 LB3>;
layers = <0 1 2 4 5>;
require-prior-idle-ms = <COMBO_IDLE_FAST>;
};
combo_redo {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp LC(Y)>;
key-positions = <LB1 LB0>;
layers = <0 1 2 4 5>;
require-prior-idle-ms = <COMBO_IDLE_FAST>;
};
combo_bspc {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp BSPC>;
key-positions = <LM3 LM2>;
layers = <0 1 2 4 5>;
require-prior-idle-ms = <COMBO_IDLE_FAST>;
};
combo_del {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp DEL>;
key-positions = <LM1 LM0>;
layers = <0 1 2 4 5>;
require-prior-idle-ms = <COMBO_IDLE_FAST>;
};
/* Vertical combos - left hand */
combo_at {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp AT>;
key-positions = <LT3 LM3>;
layers = <0 2 4>;
require-prior-idle-ms = <COMBO_IDLE_SLOW>;
};
combo_hash {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp HASH>;
key-positions = <LT2 LM2>;
layers = <0 2 4>;
require-prior-idle-ms = <COMBO_IDLE_SLOW>;
};
combo_dllr {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp DLLR>;
key-positions = <LT1 LM1>;
layers = <0 2 4>;
require-prior-idle-ms = <COMBO_IDLE_SLOW>;
};
combo_prcnt {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp PRCNT>;
key-positions = <LT0 LM0>;
layers = <0 2 4>;
require-prior-idle-ms = <COMBO_IDLE_SLOW>;
};
combo_grave {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp GRAVE>;
key-positions = <LM3 LB3>;
layers = <0 2 4>;
require-prior-idle-ms = <COMBO_IDLE_SLOW>;
};
combo_bslh {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp BSLH>;
key-positions = <LM2 LB2>;
layers = <0 2 4>;
require-prior-idle-ms = <COMBO_IDLE_SLOW>;
};
combo_equal {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp EQUAL>;
key-positions = <LM1 LB1>;
layers = <0 2 4>;
require-prior-idle-ms = <COMBO_IDLE_SLOW>;
};
combo_tilde {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp TILDE>;
key-positions = <LM0 LB0>;
layers = <0 2 4>;
require-prior-idle-ms = <COMBO_IDLE_SLOW>;
};
combo_hmr {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&to 0>;
key-positions = <LM4 LT4>;
layers = <1>;
require-prior-idle-ms = <COMBO_IDLE_FAST>;
};
combo_nohmr {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&to 1>;
key-positions = <LB4 LM4>;
layers = <0>;
require-prior-idle-ms = <COMBO_IDLE_FAST>;
};
////////////////////////////////////////////////////// RIGHT //////////////////////////////////////////////////////
/* Horizontal combos - right hand */
combo_lpar {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <HRC_LPAR>;
key-positions = <RM1 RM2>;
layers = <0 4>;
require-prior-idle-ms = <COMBO_IDLE_FAST>;
};
combo_rpar {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <HRC_RPAR>;
key-positions = <RM2 RM3>;
layers = <0 4>;
require-prior-idle-ms = <COMBO_IDLE_FAST>;
};
// combo_lt {
// timeout-ms = <COMBO_TERM_SLOW>;
// bindings = <&kp LT>;
// key-positions = <RM1 RM2>;
// layers = <2>;
// require-prior-idle-ms = <COMBO_IDLE_FAST>;
// };
// combo_gt {
// timeout-ms = <COMBO_TERM_SLOW>;
// bindings = <&kp GT>;
// key-positions = <RM2 RM3>;
// layers = <2>;
// require-prior-idle-ms = <COMBO_IDLE_FAST>;
// };
combo_lbkt {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp LBKT>;
key-positions = <RB1 RB2>;
layers = <0 4>;
require-prior-idle-ms = <COMBO_IDLE_FAST>;
};
combo_rbkt {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp RBKT>;
key-positions = <RB2 RB3>;
layers = <0 4>;
require-prior-idle-ms = <COMBO_IDLE_FAST>;
};
combo_lbrc {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp LBRC>;
key-positions = <RM1 RM2>;
layers = <2>;
require-prior-idle-ms = <COMBO_IDLE_FAST>;
};
combo_rbrc {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp RBRC>;
key-positions = <RM2 RM3>;
layers = <2>;
require-prior-idle-ms = <COMBO_IDLE_FAST>;
};
/* Vertical combos - right hand */
combo_caret {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp CARET>;
key-positions = <RT0 RM0>;
layers = <0 2 4>;
require-prior-idle-ms = <COMBO_IDLE_SLOW>;
};
combo_plus {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp PLUS>;
key-positions = <RT1 RM1>;
layers = <0 2 4>;
require-prior-idle-ms = <COMBO_IDLE_SLOW>;
};
combo_star {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp STAR>;
key-positions = <RT2 RM2>;
layers = <0 2 4>;
require-prior-idle-ms = <COMBO_IDLE_SLOW>;
};
combo_amps {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp AMPS>;
key-positions = <RT3 RM3>;
layers = <0 2 4>;
require-prior-idle-ms = <COMBO_IDLE_SLOW>;
};
combo_under {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp UNDER>;
key-positions = <RM0 RB0>;
layers = <0 2 4>;
require-prior-idle-ms = <COMBO_IDLE_SLOW>;
};
combo_minus {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp MINUS>;
key-positions = <RM1 RB1>;
layers = <0 2 4>;
require-prior-idle-ms = <COMBO_IDLE_SLOW>;
};
combo_fslh {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp FSLH>;
key-positions = <RM2 RB2>;
layers = <0 2 4>;
require-prior-idle-ms = <COMBO_IDLE_SLOW>;
};
combo_pipe {
timeout-ms = <COMBO_TERM_SLOW>;
bindings = <&kp PIPE>;
key-positions = <RM3 RB3>;
layers = <0 2 4>;
require-prior-idle-ms = <COMBO_IDLE_SLOW>;
};
};
/* use 5-column layout for Corne Mini */
chosen {
zmk,matrix_transform = &five_column_transform;
};
keymap {
compatible = "zmk,keymap";
homerow_layer {
label = "HOMEROW";
bindings = <
//╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮
&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
//├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&hml LSHFT A &hml LALT S &kp D &hml LCTRL F &kp G &kp H &hmr RCTRL J &kp K &kp L &hmr SQT SEMI
//├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &comma_morph &dot_morph &qexcl
//╰─────────────┼─────────────┴─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┴───────────────────────────╯
&mo 3 SMART_NUM <_spc 2 SPACE &kp BACKSPACE &smart_shft &mo 3
// ╰─────────────┴─────────────┴─────────────╯ ╰─────────────┴─────────────┴─────────────╯
>;
};
typing_layer {
label = "TYPING";
bindings = <
//╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮
&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
//├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI
//├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &comma_morph &dot_morph &qexcl
//╰─────────────┼─────────────┴─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┴───────────────────────────╯
&mo 3 SMART_NUM &kp SPACE &kp BACKSPACE &smart_shft &mo 3
// ╰─────────────┴─────────────┴─────────────╯ ╰─────────────┴─────────────┴─────────────╯
>;
};
navigation_layer {
label = "NAV";
bindings = <
//╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮
&kp CAPS ___ ___ &cpp_header_hop &run_project &kp PG_UP NAV_BSPC NAV_UP NAV_DEL ___
//├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&swapper &sk LALT &sk LSHFT &sk LCTRL &search_members &kp PG_DN NAV_LEFT NAV_DOWN NAV_RIGHT &context_actions
//├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
___ ___ &uncomment &comment &rename &kp INS ___ ___ ___ ___
//╰─────────────┼─────────────┴─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┴───────────────────────────╯
&kp LGUI ___ ___ ___ CANCEL &kp RGUI
// ╰─────────────┴─────────────┴─────────────╯ ╰─────────────┴─────────────┴─────────────╯
>;
};
function_layer {
label = "FUNC";
bindings = <
//╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 ___ &kp C_PREV &kp C_VOL_UP &kp C_NEXT &sleep
//├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&kp F6 &kp F7 &kp F8 &kp F9 &kp F10 ___ DSK_PREV VOL_DOWN DSK_NEXT ___
//├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&kp F11 &kp F12 &kp F14 &kp F15 &kp F16 PIN_APP PIN_WIN DSK_MNGR ___ ___
//╰─────────────┼─────────────┴─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┴───────────────────────────╯
___ &kp C_MUTE &kp C_PP ___ ___ ___
// ╰─────────────┴─────────────┴─────────────╯ ╰─────────────┴─────────────┴─────────────╯
>;
};
numbers_layer {
label = "NUMBERS";
bindings = <
//╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮
&kp N1 &kp N2 &kp N3 &kp N4 &kp N5 ___ &kp N7 &kp N8 &kp N9 ___
//├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&hml LSHFT N6 &kp N7 &kp N8 &hml LCTRL N9 &kp N0 ___ &kp N4 &kp N5 &kp N6 ___
//├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
___ ___ ___ ___ ___ &kp N0 &kp N1 &kp N2 &kp N3 ___
//╰─────────────┼─────────────┴─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┴───────────────────────────╯
___ ___ ___ ___ ___ ___
// ╰─────────────┴─────────────┴─────────────╯ ╰─────────────┴─────────────┴─────────────╯
>;
};
mouse_layer {
label = "MOUSE";
bindings = <
//╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮
&kp Q &kp W &kp E &kp R &kp T U_WH_L U_WH_D U_MS_U U_WH_U U_WH_R
//├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&kp A &kp S &kp D &kp F &kp G ___ U_MS_L U_MS_D U_MS_R ___
//├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&kp Z &kp X &kp C &kp V &kp B ___ &mkp MB4 &mkp MCLK &mkp MB5 ___
//╰─────────────┼─────────────┴─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┴───────────────────────────╯
___ ___ &mkp LCLK &mkp RCLK ___ ___
// ╰─────────────┴─────────────┴─────────────╯ ╰─────────────┴─────────────┴─────────────╯
>;
};
};
};