-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarlkb.yaml
1113 lines (1113 loc) · 24.3 KB
/
karlkb.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:
version: "v0.1"
author: "Pascal Riesinger"
units:
kx: cx
ky: cy
px: 2
py: 2
#$default_autobind: 11
$default_width: cx
$default_height: cy
points:
key:
padding: ky
zones:
matrix:
anchor:
shift: [150, -150]
columns:
outer:
key:
column_net: P16
rows:
bottom.bind: 0
pinky:
key:
spread: 18
origin: [0,-ky]
column_net: P20
rows:
top:
bind: [0.5, 5, 0.1, 0.1]
home:
bind: [0, 5, 0.1, 0.1]
ring:
key:
spread: 18
stagger: 10
origin: [0,-ky]
column_net: P19
rows:
top:
bind: [0.1, 0.5 kx, 0.1, 0.1]
home:
bind: [0.1, 0.5 kx, 0.1, 0.1]
middle:
key:
spread: 18
stagger: ky/4
origin: [0,-ky]
column_net: P18
rows:
top:
bind: [0.1, 0.1, 0.5 kx, 0.1]
index:
key:
spread: 18
stagger: -ky/3
origin: [0,-ky]
column_net: P15
rows:
top:
bind: [0.1, 0.1, 0.5 kx, 0.5 kx]
inner:
key:
spread: 18
stagger: -ky/6
column_net: P14
rows:
bottom:
row_net: P6
tags:
high1: false
bind: 0.5
home:
row_net: P5
tags:
high1: false
bind: 0.5
top:
row_net: P4
tags:
high1: false
bind: 0.5
thumbfan:
anchor:
ref: matrix_inner_bottom
shift: [0, -1.1 ky]
columns:
home:
key:
spread: kx
splay: -15
origin: [-0.5 kx, -0.7 ky]
column_net: P15
rows:
thumb:
#bind: [3, -2, 4, 0.1]
tags:
high1: true
far:
key:
spread: kx
splay: -15
origin: [-0.5 kx, -0.5 ky]
column_net: P14
rows:
thumb:
#bind: [4, -2, 0.1, 0.1]
tags:
high1: true
rows:
thumb:
row_net: P7
bind: [0.1, 0.1, 0.1, 0.1]
rotate: 0
outlines:
# board dimensions according to JLCPCB: 166 mm * 113.7 mm
raw:
- what: rectangle
where: "high1"
size: [kx + px, ky + py]
corner: px
bound: true
- what: rectangle
where: "high15"
size: [1.5kx + px, 1ky + py]
corner: px
bound: false
raw_top_plate:
- what: rectangle
where: "high1"
bound: true
size: [kx + px, ky + py]
corner: px
- what: rectangle
where: "high15"
size: [kx + px, ky + py]
corner: px
bound: true
thumbfan_glue:
- what: polygon
points:
- ref: matrix_inner_bottom
shift: [0.5 kx + 0.5px, 0.5 ky + 0.5 py]
- ref: thumbfan_far_thumb
shift: [0.7kx + 0.5px, 1ky]
- ref: thumbfan_far_thumb
shift: [0.7kx + 0.5px, -0.6ky]
- ref: thumbfan_far_thumb
shift: [-0.6 kx, -0.6ky]
- ref: thumbfan_home_thumb
#shift: [-0 kx + 0.5 px, 1ky]
- ref: matrix_outer_bottom
shift: [-0.5 kx + 0.5 py, -0.5 ky - 0.5 py]
- ref: matrix_pinky_home
- ref: matrix_inner_home
thumbfan_glue_top_plate:
- what: polygon
points:
- ref: matrix_inner_bottom
shift: [ 0.62kx , -0.7 ky + 0.5 py]
- ref: thumbfan_far_thumb
shift: [0.75 kx + 0.5px, -0.55 ky - 0.5 py]
- ref: thumbfan_far_thumb
shift: [-0.75 kx - 0.5px, -0.6ky]
- ref: thumbfan_home_thumb
shift: [-0.5 kx + 0.5 px, -0.2ky]
- ref: matrix_outer_bottom
shift: [0.5 kx - 0.5 py, -0.5 ky - 0.5 py]
- ref: matrix_pinky_home
- ref: matrix_inner_home
controller_area:
main:
what: rectangle
adjust:
ref:
- matrix_inner_top
shift: [1.2kx, -1.8ky]
size: [23, 75.5]
corner: 0
controller_plate:
main:
what: rectangle
adjust:
ref:
- matrix_inner_top
shift: [21.5, -14]
size: [20, 39]
corner: px
controller_plate_holes:
left:
what: circle
adjust:
ref: matrix_inner_bottom
shift: [16, 4]
radius: 1.5
right:
what: circle
adjust:
ref: matrix_inner_bottom
shift: [26.5, 4]
radius: 1.5
circle:
main:
what: circle
adjust:
ref:
- matrix_index_bottom
shift: [-24, -137]
radius: 105
switches:
- what: rectangle
where: true
size: 14
bound: false
keycaps1u:
- what: rectangle
where: "high1"
size: [1kx - 0.5, 1ky - 0.5]
bound: false
corner: 1
keycaps15u:
- what: rectangle
where: "high15"
size: [1.5kx - 0.5, 1ky - 0.5] # Choc keycaps are 17.5 x 16.5
bound: false
corner: 1
keywell:
main:
what: outline
name: raw
thumbfan_glue:
what: outline
name: thumbfan_glue
operation: add
keywell_top_plate:
main:
what: outline
name: raw_top_plate
thumbfan_glue2:
what: outline
name: thumbfan_glue_top_plate
operation: add
base_outline:
main:
what: outline
name: keywell
circle:
what: outline
name: circle
operation: subtract
controller:
what: outline
name: controller_area
operation: add
cutout:
- what: outline
name: base_outline
fillet: 1
screw_holes:
top_left:
what: circle
adjust:
- ref: matrix_ring_home
shift: [-0.6 kx, -0.1 ky]
radius: 1.05
bottom_left:
what: circle
adjust:
- ref: matrix_pinky_bottom
shift: [0.6 kx, 0]
radius: 1.05
top_right:
what: circle
adjust:
- ref: matrix_inner_top
shift: [-0.53 kx, 0]
radius: 1.05
palm:
what: circle
adjust:
- ref: matrix_index_bottom
shift: [0.45kx, -0.75 ky]
radius: 1.05
thumb:
what: circle
adjust:
- ref: thumbfan_far_thumb
shift: [0, 0.6 kx]
radius: 1.05
mounting_holes:
$extends: outlines.screw_holes
top_left:
radius: 2.05
bottom_left:
radius: 2.05
top_right:
radius: 2.05
palm:
radius: 2.05
thumb:
radius: 2.05
controller_plate_mounting_holes:
$extends: outlines.controller_plate_holes
left:
radius: 2.5
right:
radius: 2.5
controller_plate_with_holes:
main:
what: outline
name: controller_plate
holes:
what: outline
name: controller_plate_holes
operation: subtract
bottom_outline:
main:
what: outline
name: cutout
screw_holes:
what: outline
# TODO use footprints with pad + via reinforcement as mounting holes
name: screw_holes
operation: subtract
plate_before_circle:
main:
what: outline
name: keywell_top_plate
#fillet: 1
circle:
what: outline
name: circle
operation: subtract
plate:
main:
what: outline
name: plate_before_circle
fillet: 1
switches:
what: outline
name: switches
operation: subtract
mounting_holes:
what: outline
# TODO use footprints with pad + via reinforcement as mounting holes
name: screw_holes
operation: subtract
full_with_keycaps:
main:
what: outline
name: keywell
circle:
what: outline
name: circle
operation: subtract
controller:
what: outline
name: controller_area
operation: add
keycaps1u:
what: outline
name: keycaps1u
operation: subtract
keycaps15u:
what: outline
name: keycaps15u
operation: subtract
mounting_holes:
what: outline
# TODO use footprints with pad + via reinforcement as mounting holes
name: screw_holes
operation: subtract
preview:
base_outline:
what: outline
name: base_outline
keycaps1u:
what: outline
name: keycaps1u
operation: subtract
keycaps15u:
what: outline
name: keycaps15u
operation: subtract
pcb_case:
main:
what: outline
name: cutout
pcb:
main:
what: outline
name: cutout
mounting_holes:
what: outline
# TODO use plated through hole footprints as mounting holes
name: mounting_holes
operation: subtract
pcbs:
karlkb_6x3_top_plate:
outlines:
edge:
outline: plate
layer: Edge.Cuts
# Remove this if you'd rather pay more to not have the order number printed at all
footprints:
jlc_order_number:
what: text
adjust:
ref:
- matrix_ring_home
shift: [-0.25 kx, 0.5 ky]
params:
text: "JLCJLCJLCJLC"
justify: left
karlkb_6x3_bottom_plate:
outlines:
edge:
outline: bottom_outline
layer: Edge.Cuts
# Remove this if you'd rather pay more to not have the order number printed at all
footprints:
jlc_order_number:
what: text
adjust:
ref:
- matrix_ring_home
shift: [-0.25 kx, 0.5 ky]
params:
text: "JLCJLCJLCJLC"
justify: left
karlkb_6x3:
outlines:
edge:
outline: pcb
layer: Edge.Cuts
keys1u:
outline: keycaps1u
layer: Eco1.User
keys15u:
outline: keycaps15u
layer: Eco1.User
switches_l:
outline: switches
layer: F.SilkS
switches_r:
outline: switches
layer: B.SilkS
top_plate:
outline: plate
layer: Eco2.User
bottom_plate:
outline: bottom_outline
layer: Cmts.User
controller:
outline: controller_plate_with_holes
layer: Cmts.User
footprints:
choc_hotswap:
what: choc
where: true
params:
hotswap: true
reverse: true
keycaps: true
from: "{{colrow}}"
to: "{{column_net}}"
diode:
what: diode
where: true
params:
reverse: true
from: "{{colrow}}"
to: "{{row_net}}"
adjust:
shift: [0, -5]
mcu:
what: promicro_pretty
params:
orientation: up
adjust:
ref:
- matrix_inner_top
shift: [21, -11]
rotate: 270
# Remove this if you'd rather pay more to not have the order number printed at all
jlc_order_number:
what: text
adjust:
ref:
- matrix_ring_home
shift: [-0.25 kx, 0.5 ky]
params:
text: "JLCJLCJLCJLC"
justify: left
bat:
what: bat2p0
adjust:
ref: matrix_inner_bottom
shift: [13.5, -3]
rotate: 0
params:
front: true
back: true
neg: GND
pos: Bplus
pad_plus:
what: pad
adjust:
ref:
- matrix_inner_bottom
shift: [18, -1.7]
rotate: 0
params:
front: true
back: true
width: 1.5
height: 1.5
align: "right"
text: "Bplus"
net: Bplus
pad_minus:
what: pad
adjust:
ref:
- matrix_inner_bottom
shift: [18, -4.3]
rotate: 0
params:
front: true
back: true
width: 1.5
height: 1.5
align: "right"
text: "GND"
net: GND
jumper_l:
what: jumper
adjust:
ref:
- matrix_inner_bottom
shift: [25, -6]
rotate: 270
params:
side: B
from: Bplus
to: RAW
jumper_r:
what: jumper
adjust:
ref:
- matrix_inner_bottom
shift: [25, -6]
rotate: 270
params:
side: F
from: Bplus
to: RAW
pcm12:
what: pcm12
adjust:
ref: matrix_inner_bottom
shift: [30.9, -4]
rotate: 90
params:
reverse: true
from: RAW
to: Bplus
reset:
what: b3u1000p
adjust:
ref: matrix_inner_bottom
shift: [16, -9]
rotate: 0
params:
reverse: true
r1: RST
r2: GND
info_l:
what: text
adjust:
ref:
- matrix_inner_bottom
shift: [-49, -24]
rotate: 0
params:
layer: F.SilkS
text: "karlkb v0.1\\nby Pascal Riesinger"
justify: left
info_r:
what: text
adjust:
ref:
- matrix_inner_bottom
shift: [-39, -24]
rotate: 0
params:
layer: B.SilkS
text: "karlkb v0.1\\nby Pascal Riesinger"
justify: left mirror
side_l:
what: sideindicator
adjust:
ref:
- matrix_index_bottom
shift: [-2.1 kx, -1.475kx]
params:
side: F
side_r:
what: sideindicator
adjust:
ref:
- matrix_index_bottom
shift: [-2.1 kx, -1.7kx]
params:
side: B
mcu_solder_l:
what: text
adjust:
ref:
- matrix_inner_home
shift: [1kx, -0.2kx]
rotate: 90
params:
text: "Solder the jumpers,"
style: italic
justify: left
mcu_solder_r:
what: text
adjust:
ref:
- matrix_inner_home
shift: [1kx, 0.8kx]
rotate: 90
params:
layer: B.SilkS
text: "Solder the jumpers,"
style: italic
justify: left mirror
mcu_info_l:
what: text
adjust:
ref:
- matrix_inner_home
shift: [1.3kx, -0.2kx]
rotate: 90
params:
text: "and place MCU facing UP!"
style: italic
justify: left
mcu_info_r:
what: text
adjust:
ref:
- matrix_inner_home
shift: [1.3kx, 0.8kx]
rotate: 90
params:
layer: B.SilkS
text: "and place MCU facing UP!"
style: italic
justify: left mirror
via_RAW_1:
what: simple_via
adjust:
ref: matrix_inner_bottom
shift: [27.5,-6.3]
params:
net: RAW
via_Bplus_1:
what: simple_via
adjust:
ref: matrix_inner_bottom
shift: [26,-4]
params:
net: Bplus
via_GND_1:
what: simple_via
adjust:
ref: matrix_inner_bottom
shift: [21,-4]
params:
net: GND
via_GND_2:
what: simple_via
adjust:
ref: matrix_ring_top
shift: [11,3]
params:
net: GND
via_GND_3:
what: simple_via
adjust:
ref: matrix_ring_top
shift: [12,-3]
params:
net: GND
via_GND_4:
what: simple_via
adjust:
ref: matrix_middle_top
shift: [11,-1]
params:
net: GND
via_GND_5:
what: simple_via
adjust:
ref: matrix_inner_top
shift: [-3,-2]
params:
net: GND
via_GND_6:
what: simple_via
adjust:
ref: matrix_inner_home
shift: [-7,-2]
params:
net: GND
via_GND_7:
what: simple_via
adjust:
ref: matrix_inner_bottom
shift: [-3,-2.5]
params:
net: GND
via_GND_8:
what: simple_via
adjust:
ref: matrix_inner_bottom
shift: [5,-2.5]
params:
net: GND
via_GND_9:
what: simple_via
adjust:
ref: matrix_inner_bottom
shift: [9.5,-2]
params:
net: GND
via_RST_1:
what: simple_via
adjust:
ref: matrix_inner_bottom
shift: [14.5,-6.5]
params:
net: RST
via_RST_2:
what: simple_via
adjust:
ref: matrix_inner_bottom
shift: [27,-9]
params:
net: RST
via_Bplus_2:
what: simple_via
adjust:
ref: matrix_inner_bottom
shift: [31.5,-4]
params:
net: Bplus
via_p20_1:
what: simple_via
adjust:
ref: matrix_pinky_top
shift: [0,3]
params:
net: P20
via_pinky_top:
what: simple_via
adjust:
ref: matrix_pinky_top
shift: [-5,8]
params:
net: pinky_top
via_P20_2:
what: simple_via
adjust:
ref: matrix_pinky_home
shift: [-2.5,3]
params:
net: P20
via_pinky_home:
what: simple_via
adjust:
ref: matrix_pinky_home
shift: [0,8.5]
params:
net: pinky_home
via_P20_3:
what: simple_via
adjust:
ref: matrix_pinky_bottom
shift: [0,3]
params:
net: P20
via_P20_4:
what: simple_via
adjust:
ref: matrix_middle_top
shift: [9,-1]
params:
net: P20
via_P20_5:
what: simple_via
adjust:
ref: matrix_middle_top
shift: [6,-5]
params:
net: P20
via_pinky_bottom:
what: simple_via
adjust:
ref: matrix_pinky_bottom
shift: [0,8.5]
params:
net: pinky_bottom
via_P19_1:
what: simple_via
adjust:
ref: matrix_ring_top
shift: [-2.5,3]
params:
net: P19
via_ring_top:
what: simple_via
adjust:
ref: matrix_ring_top
shift: [-5,8]
params:
net: ring_top
via_P19_2:
what: simple_via
adjust:
ref: matrix_ring_home
shift: [-2.5,3]
params:
net: P19
via_ring_home:
what: simple_via
adjust:
ref: matrix_ring_home
shift: [0,8.5]
params:
net: ring_home
via_P19_3:
what: simple_via
adjust:
ref: matrix_ring_bottom
shift: [0,3]
params:
net: P19
via_ring_bottom:
what: simple_via
adjust:
ref: matrix_ring_bottom
shift: [0,8.5]
params:
net: ring_bottom
via_P18_1:
what: simple_via
adjust:
ref: matrix_middle_top
shift: [0,3]
params:
net: P18
via_middle_top:
what: simple_via
adjust:
ref: matrix_middle_top
shift: [-5,8]
params:
net: middle_top
via_P18_2:
what: simple_via
adjust:
ref: matrix_middle_home
shift: [0,3]
params:
net: P18
via_middle_home:
what: simple_via
adjust:
ref: matrix_middle_home
shift: [0,8.5]
params:
net: middle_home
via_P18_3:
what: simple_via
adjust:
ref: matrix_middle_bottom
shift: [-3,3]
params:
net: P18
via_middle_bottom:
what: simple_via
adjust:
ref: matrix_middle_bottom
shift: [0,8.5]
params:
net: middle_bottom
via_P15_1:
what: simple_via
adjust:
ref: matrix_index_top
shift: [0,3]
params:
net: P15
via_index_top:
what: simple_via
adjust:
ref: matrix_index_top
shift: [-5,8]
params:
net: index_top
via_P15_2:
what: simple_via
adjust:
ref: matrix_index_home
shift: [0,3]
params:
net: P15
via_index_home:
what: simple_via
adjust:
ref: matrix_index_home
shift: [0,8.5]
params:
net: index_home
via_P15_3:
what: simple_via
adjust:
ref: matrix_index_bottom
shift: [0,3]
params:
net: P15
via_index_bottom:
what: simple_via
adjust:
ref: matrix_index_bottom
shift: [0,8.5]
params:
net: index_bottom
via_P14_1:
what: simple_via
adjust:
ref: matrix_inner_top
shift: [0,3]
params:
net: P14
via_inner_top:
what: simple_via
adjust:
ref: matrix_inner_top
shift: [-5,8]
params:
net: inner_top
via_P14_2:
what: simple_via
adjust:
ref: matrix_inner_home
shift: [0,3]
params:
net: P14
via_inner_home:
what: simple_via
adjust:
ref: matrix_inner_home
shift: [0,8.5]
params:
net: inner_home
via_P14_3:
what: simple_via
adjust:
ref: matrix_inner_bottom
shift: [0,3]
params:
net: P14
via_inner_bottom:
what: simple_via
adjust:
ref: matrix_inner_bottom
shift: [0,8.5]
params:
net: inner_bottom
via_18_4:
what: simple_via
adjust:
ref: thumbfan_home_thumb
shift: [0,3]
params:
net: P18
via_15_4:
what: simple_via
adjust:
ref: thumbfan_home_thumb
shift: [0,3]
params:
net: P15
via_home_thumb: