generated from zmkfirmware/unified-zmk-config-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yaml
1095 lines (992 loc) · 22.5 KB
/
config.yaml
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
meta:
author: [email protected]
version: &version v1.0
repository: &repo https://github.com/ctranstrum/lintilla
# Depending on where you are ordering from, uncomment or edit one of these:
order_num_template: &order_text JLCJLCJLCJLC # for ordering from JLCpcb.com
# order_num_template: &order_text WayWayWay # for ordering from PCBway.com
# order_num_template: &order_text "" # remove the order number text completely
units:
$default_spread: (u + cx) / 2
$default_padding: (u + cy) / 2
$default_height: cy
$default_width: cx
# distance between keys
dx: (u + cx) / 2
dy: (u + cy) / 2
# distance to the line between keys
hdx: dx / 2
hdy: dy / 2
points:
zones:
matrix:
# Shift the PCB down and to the right to get it on the sheet in kicad
anchor.shift: [50, -100]
key:
tags: [key]
columns:
outer:
key:
splay: 12.5
colpin: P4
rows:
bottom:
tags: [key, bumper_left]
rowpin: P2
home:
rowpin: P3
pinky:
key:
stagger: -dx * 0.45
colpin: P8
rows:
bottom:
bind: [5, 50, 0, 0]
rowpin: P1
home:
bind: 0
rowpin: P2
top:
bind: 0
rowpin: P3
fn:
orient: -10
shift: [0, 8.9]
bind: [0, 25, 20, 0]
tags: [key, bumper_left]
rowpin: P10
ring:
key:
stagger: dx * 0.66
splay: -5
colpin: P6
rows:
bottom:
rowpin: P2
home:
rowpin: P3
top:
rowpin: P10
middle:
key:
shift: [0.2, 0]
stagger: hdx
splay: -5
colpin: P9
rows:
bottom:
rowpin: P2
home:
bind: 0
rowpin: P3
top:
rowpin: P10
index:
key:
stagger: -hdx
splay: -2.5
colpin: P7
rows:
bottom:
rowpin: P2
home:
rowpin: P3
top:
rowpin: P10
inner:
key:
stagger: -dx / 6
colpin: P5
rows:
bottom:
bind: [5, 24, 16.76, 0]
rowpin: P2
home:
rowpin: P3
top:
bind: [0, 5, 5, 5]
rowpin: P10
tags: [key, bumper_right]
# thumb zone
thumb:
key:
tags: [key]
rowpin: P1
anchor:
ref: matrix_index_bottom
shift: [0, -dy - 1.5]
columns:
tucky.rows.spot:
skip: true
secondary.rows.spot:
splay: -15
origin: [-cx / 2, -cy / 2]
colpin: P9
bind: [0, 1, 0, 0]
primary.rows.spot:
splay: -15
origin: [-cx / 2, -cy / 2]
colpin: P7
bind: [0, 1, 0, 1]
reachy.rows.spot:
splay: -15
origin: [-cx / 2, -cy / 2]
colpin: P5
bind: [0, 0, 0, 1]
tags: [key, bumper_right]
# component zones
mcu:
anchor:
ref: matrix_inner_top
shift: [26, 0]
#columns.xiao.rows.ble:
key:
tags: [mcu, component]
bind: 10
battery:
anchor:
ref: matrix_inner_bottom
shift: [26, 1]
#columns.compartment.rows.cutout:
key:
tags: [battery, component]
bind: 10
reset_button:
anchor:
ref: matrix_index_top
shift: [-3, cy / 2]
key:
tags: [reset, component]
power_button:
anchor:
ref: matrix_inner_top
shift: [-3, cy / 2 + 0.05]
key:
tags: [power, component]
screw_top_left:
anchor:
ref: matrix_pinky_fn
shift: [hdx + 3, hdy - 3]
key:
tags: [screw, hardware]
screw_bottom_left:
anchor:
ref: matrix_pinky_bottom
shift: [hdx + 3, -hdy + 3]
key:
tags: [screw, hardware]
screw_top_right:
anchor:
ref: matrix_inner_top
shift: [hdx + 2, hdy - 3]
key:
tags: [screw, hardware]
screw_bottom_right:
anchor:
ref: thumb_primary_spot
shift: [hdx + 2, hdy]
key:
tags: [screw, hardware]
outlines:
# Get the basic PCB outline
_raw:
- what: rectangle
where: key
bound: true
corner: 3
size: [cx + 4, cy + 4]
- what: rectangle
where: mcu
size: [30, 21]
- what: rectangle
where: battery
size: [30, 60]
corner: 1
pcb_fill:
- what: outline
name: _raw
fillet: 3
# Underneath the board, including space for battery wires and solder
# so that's why it's larger than it needs to be
_xiao_cutout:
- what: rectangle
where: mcu
size: [14, 25]
adjust.shift: [0, -4]
# Put a tiny wall on the bottom half
_xiao_cutout_wall:
- what: rectangle
where: mcu
size: [19, 21.5]
corner: 1
# Make a tiny hole for the blinky light
_xiao_light_guide_right:
- what: circle
where: mcu
radius: 1.05
adjust.shift: [-6, 7.5]
_xiao_light_guide_left:
- what: circle
where: mcu
radius: 1.05
adjust.shift: [6, 7.5]
# Just the center of the xiao, as a pcb cutout area to access the bottom pads
_xiao_bottom_pads:
- what: rectangle
where: mcu
size: [14, 22]
corner: 1
_xiao_usb:
- what: rectangle
where: mcu
size: [9.5, 6.5]
adjust.shift: [0, 7.25]
_xiao_chip:
- what: rectangle
where: mcu
size: [13, 12]
adjust.shift: [0, -2]
_battery_cutout:
- what: rectangle
where: battery
size: [24, 34]
corner: 1
# Add a little extra cutout under the board to attach the cables
_battery_cutout_under:
- what: outline
name: _battery_cutout
- what: circle
where: battery
radius: 7
adjust.shift: [-12, -15] # lower left corner
- what: rectangle
where: battery
size: [24, 10]
corner: 1
adjust.shift: [0, -17] # bottom edge of original cutout
pcb_outline:
- pcb_fill
- -_xiao_bottom_pads
- -_battery_cutout
# Now set up the holes in the plate for the switches
_switch_outline_holes:
- what: rectangle
where: key
bound: false
size: [13.8, 13.8]
corner: 1
_clip_holes:
- what: rectangle
where: key
bound: false
size: [15, 13]
corner: 1
# An indentation to fit the hotswap tool beneath each switch
_swaptool:
- what: rectangle
where: key
bound: false
size: [3.5, 18.7]
corner: 1
_switch_holes:
# these are created in the pcb software ...
# but we need to create them manually for our mock pcb
# ... also the radius has been rounded up for fdm printing ...
- what: circle # center post
where: key
radius: 1.9
- what: circle # left stabililzer
where: key
radius: 0.9
adjust.shift: [-5.5, 0]
- what: circle # right stabilizer
where: key
radius: 0.9
adjust.shift: [5.5, 0]
_diode_outline:
- what: rectangle
where: key
size: [3.7, 1.6]
adjust.shift: [0, 3.75]
_diode_hollow:
- what: outline
name: _diode_outline
expand: 0.4
_socket_holes:
# center
- what: circle
where: key
radius: 1.6
adjust.shift: [0, -5.95]
# left (or rather, right on the opposite side of the board)
- what: circle
where: key
radius: 1.6
adjust.shift: [-5, -3.75]
# right
- what: circle
where: key
radius: 1.6
adjust.shift: [5, -3.75]
# make a fairly accurate socket model
_socket_outline:
- what: rectangle
adjust.shift: [0, -5.95]
size: [4.75, 4.65]
bevel: 1
- what: rectangle
adjust.shift: [4.85, -3.8]
size: [4.85, 4.65]
fillet: 1
- what: rectangle
size: 2.6
adjust.shift: [2.4, -4.8]
- what: rectangle
adjust.shift: [1.4, -2.5]
size: 2.3
- what: circle
radius: 2.3
adjust.shift: [0.4, -1.35]
operation: subtract
- what: rectangle
size: 2
adjust.shift: [2.375, -6.125]
- what: circle
radius: 1
adjust.shift: [3.375, -7.125]
operation: subtract
- what: rectangle
size: [3.6, 1.7]
adjust.shift: [-2.375, -5.95]
- what: rectangle
size: [3.6, 1.7]
adjust.shift: [7.325, -3.8]
- what: rectangle
size: [2, 0.6]
adjust.shift: [6.5, -1.775]
# enlarge it a bit for wiggle room
_socket_hollow_right:
- what: outline
name: _socket_outline
expand: 0.5
# then drop it under every key
socket_hollow_right_board:
- what: outline
name: _socket_hollow_right
where: key
# make a fairly accurate socket model
_socket_outline_mirror:
- what: rectangle
adjust.shift: [0, -5.95]
size: [4.75, 4.65]
bevel: 1
- what: rectangle
adjust.shift: [-4.85, -3.8]
size: [4.85, 4.65]
fillet: 1
- what: rectangle
size: 2.6
adjust.shift: [-2.4, -4.8]
- what: rectangle
adjust.shift: [-1.4, -2.5]
size: 2.3
- what: circle
radius: 2.3
adjust.shift: [-0.4, -1.35]
operation: subtract
- what: rectangle
size: 2
adjust.shift: [-2.375, -6.125]
- what: circle
radius: 1
adjust.shift: [-3.375, -7.125]
operation: subtract
- what: rectangle
size: [3.6, 1.7]
adjust.shift: [2.375, -5.95]
- what: rectangle
size: [3.6, 1.7]
adjust.shift: [-7.325, -3.8]
- what: rectangle
size: [2, 0.6]
adjust.shift: [-6.5, -1.775]
# enlarge it a bit for wiggle room
_socket_hollow_left:
- what: outline
name: _socket_outline_mirror
expand: 0.5
# then drop it under every key
socket_hollow_left_board:
- what: outline
name: _socket_hollow_left
where: key
_socket_model_pins:
- what: rectangle
size: [1.2, 0.6]
adjust.shift: [0, -5.95]
- what: rectangle
size: [1.2, 0.6]
adjust.shift: [5, -3.8]
_socket_model_pins_hollow:
- what: outline
name: _socket_model_pins
expand: 0.3
_socket_posts_outline:
- what: circle
radius: 1.45
adjust.shift: [0, -5.95]
- what: circle
radius: 1.45
adjust.shift: [5, -3.8]
socket_models:
- what: outline
name: _socket_outline
where: key
- what: outline
name: _socket_model_pins
operation: subtract
where: key
socket_posts_model:
- what: outline
name: _socket_posts_outline
where: key
- what: outline
name: _socket_model_pins_hollow
where: key
operation: subtract
# The PCB outline with switch outline holes cut out
plate:
- pcb_fill
- -_switch_outline_holes
_bumper:
- what: circle
radius: 3.25
_bumpers_left:
- what: outline
name: _bumper
where: bumper_left
adjust.shift: [-5.5, 5.5]
_bumpers_right:
- what: outline
name: _bumper
where: bumper_right
adjust.shift: [5.5, 5.5]
_bumpers:
- _bumpers_left
- _bumpers_right
_hex_nut_angle:
- what: rectangle
size: [2.45, 4.25]
_hex_nut:
- _hex_nut_angle
- what: outline
name: _hex_nut_angle
adjust.rotate: 60
- what: outline
name: _hex_nut_angle
adjust.rotate: -60
_hex_nuts:
- what: outline
name: _hex_nut
where: screw
_screw_outline:
- what: circle
radius: 2.25
where: screw
_screw_shaft:
- what: circle
radius: 1.2
where: screw
_countersink1:
- what: outline
name: _screw_shaft
expand: 1
_countersink2:
- what: outline
name: _screw_shaft
expand: 0.8
_countersink3:
- what: outline
name: _screw_shaft
expand: 0.6
_countersink4:
- what: outline
name: _screw_shaft
expand: 0.4
_countersink5:
- what: outline
name: _screw_shaft
expand: 0.2
_reset_model:
- what: rectangle
size: [6.3, 3.6]
where: reset
- what: rectangle
size: [2.55, 0.9]
where: reset
adjust.shift: [0, 2.05]
_reset_hollow:
- what: outline
name: _reset_model
expand: 0.5
_power_model:
- what: rectangle
size: [8, 3.9]
where: power
- what: rectangle
size: 1.3
where: power
adjust.shift: [1.5, 2.6]
_power_hollow:
- what: outline
name: _power_model
expand: 0.5
cases:
_xiao_light_right:
- what: outline
name: _xiao_light_guide_right
extrude: 2.2
_xiao_light_left:
- what: outline
name: _xiao_light_guide_left
extrude: 2.2
_countersunk_screw:
- what: outline
name: _countersink1
extrude: 0.2
- what: outline
name: _countersink2
extrude: 0.2
shift: [0, 0, 0.2]
- what: outline
name: _countersink3
extrude: 0.2
shift: [0, 0, 0.4]
- what: outline
name: _countersink4
extrude: 0.2
shift: [0, 0, 0.6]
- what: outline
name: _countersink5
extrude: 0.2
shift: [0, 0, 0.8]
- what: outline
name: _screw_shaft
extrude: 2.2
shift: [0, 0, 1]
_flat_screw:
- what: outline
name: _screw_outline
extrude: 1.2
- what: outline
name: _screw_shaft
extrude: 2
shift: [0, 0, 1.2]
# Let's get a model of the PCB for testing
# just remove the underscore in front to enable
_mock_pcb:
- what: outline
name: pcb_outline
extrude: 1.6
- what: outline
name: _switch_holes
extrude: 1.6
operation: subtract
- what: outline
name: _socket_holes
extrude: 1.6
operation: subtract
- what: outline
name: _screw_shaft
extrude: 1.6
operation: subtract
_mock_pcb_with_components:
- _mock_pcb
- what: outline
name: socket_posts_model
extrude: 1.6
- what: outline
name: socket_models
extrude: 1.8
shift: [0, 0, 1.6]
- what: outline
name: _diode_outline
extrude: 1.1
shift: [0, 0, 1.6]
- what: outline
name: _reset_model
extrude: 1.65
shift: [0, 0, 1.6]
- what: outline
name: _power_model
extrude: 1.5
shift: [0, 0, 1.6]
# Simple sandwich case is easy
_top:
- what: outline
name: plate
extrude: 2.2
- what: outline
name: _clip_holes
extrude: 0.9
shift: [0, 0, 1.3]
operation: subtract
- what: outline
name: _swaptool
extrude: 1
operation: subtract
# hollow out under the xiao
- what: outline
name: _xiao_usb
extrude: 1.7
shift: [0, 0, 0.5]
operation: subtract
- what: outline
name: _xiao_chip
extrude: 0.2
shift: [0, 0, 2]
operation: subtract
# Give the battery a tiny bit more room
- what: outline
name: _battery_cutout
extrude: 1.4
shift: [0, 0, 0.8]
operation: subtract
# Cut out for the hex nuts
- what: outline
name: _hex_nuts
extrude: 1.6
shift: [0, 0, 0.6]
operation: subtract
top_right:
- _top
- -_xiao_light_right
top_left_reverse:
- _top
- -_xiao_light_left
_bottom:
- what: outline
name: pcb_fill
extrude: 3.2
- what: outline
name: _switch_holes
extrude: 1.3
shift: [0, 0, 1.9]
operation: subtract
- what: outline
name: _diode_hollow
extrude: 1.4
shift: [0, 0, 1.8]
operation: subtract
- what: outline
name: _battery_cutout_under
extrude: 2.4
shift: [0, 0, 0.8]
operation: subtract
- what: outline
name: _xiao_cutout
extrude: 2.5
shift: [0, 0, 0.7]
operation: subtract
- what: outline
name: _xiao_cutout_wall
extrude: 1.2
shift: [0, 0, 2]
operation: subtract
- what: outline
name: _reset_hollow
extrude: 1.8
shift: [0, 0, 1.4]
operation: subtract
- what: outline
name: _power_hollow
extrude: 1.6
shift: [0, 0, 1.6]
operation: subtract
- what: outline
name: _bumpers
extrude: 1
operation: subtract
- -_countersunk_screw
bottom_right_reverse:
- _bottom
- what: outline
name: socket_hollow_right_board
extrude: 2
shift: [0, 0, 1.2]
operation: subtract
bottom_left:
- _bottom
- what: outline
name: socket_hollow_left_board
extrude: 2
shift: [0, 0, 1.2]
operation: subtract
pcbs:
lintilla:
template: kicad8
outlines:
main:
outline: pcb_outline
params:
name: Lintilla
paper: A4
footprints:
hotswap_sockets:
what: pg1350
where: key
params:
from: "{{colpin}}"
to: "{{colrow}}"
keycaps: true
reverse: true
hotswap: true
vias: true
adjust.rotate: 180
diodes:
what: sod123
where: key
adjust:
shift: [0, 3.75]
rotate: 180
params:
designator: SW
from: "{{colrow}}"
to: "{{rowpin}}"
tht: false
via: "pad"
xiao_mcu:
what: xiao
where: mcu
params:
orientation: down
VUSB: none
VCC: none
P0: none
xiao_note:
what: text
where: mcu
adjust.shift: [0, -12]
params.text: XIAO BLE FACE DOWN
battery_wire_guide:
what: arc
where: battery
adjust.shift: [-12, -15]
xiao_bat_pos_front:
what: pad
where: battery
adjust.shift: [5, 19]
params:
side: F
net: BAT+
text: BAT+
shape: circle
align: right
width: 2
height: 2
xiao_bat_pos_back:
what: pad
where: battery
adjust.shift: [-5, 19]
params:
side: B
net: BAT+
text: BAT+
shape: circle
width: 2
height: 2
xiao_bat_pos_via_near:
what: via
where: battery
adjust.shift: [-8, 18.25]
params.net: BAT+
xiao_bat_pos_via_far:
what: via
where: matrix_inner_home
adjust.shift: [hdx -1.5, 1.25]
params.net: BAT+
xiao_reset_front:
what: pad
where:
ref: battery
shift: [-5, 19]
params:
side: F
net: RST
text: RST
shape: circle
width: 2
height: 2
xiao_reset_back:
what: pad
where:
ref: battery
shift: [5, 19]
params:
side: B
net: RST
text: RST
shape: circle
align: right
width: 2
height: 2
xiao_reset_via_near:
what: via
where: battery
adjust.shift: [-8, 19.75]
params.net: RST
xiao_reset_via_far:
what: via
where: matrix_index_home
adjust.shift: [hdx -1.5, -0.3]
params.net: RST
bat_note:
what: text
where: battery
adjust.shift: [12, -18.5]
params:
text: BATTERY 5 x 20 x 30 mm
justify: right
solder_note:
what: text
where: matrix_pinky_bottom
adjust.shift: [dx, -hdy]
params:
text: solder all components same side
justify: left
bat_raw_pos:
what: pad
where: battery
adjust:
shift: [-14, -10]
rotate: -90
params:
net: RAW
text: BAT+
shape: circle
align: right
width: 2
height: 2
bat_raw_pos_via:
what: via
where: matrix_inner_bottom
adjust.shift: [-hdx, -hdy]
params.net: RAW
bat_raw_neg:
what: pad
where: battery
adjust:
shift: [-10, -19]
params:
net: GND
text: BAT-
width: 2
height: 2
reset_front:
what: evqpuc
where: reset
params:
side: F
from: GND
to: RST
reset_back:
what: evqpuc
where: reset
params:
side: B
from: GND
to: RST
reset_note:
what: text
where: reset
adjust.shift: [6, 1]
params.text: RESET
power_front:
what: trislider
where: power
params:
side: F