Skip to content

Instantly share code, notes, and snippets.

@ldesgoui
Created May 19, 2026 12:27
Show Gist options
  • Select an option

  • Save ldesgoui/5720bd5a6a84f38b7bb4387f72acbc9a to your computer and use it in GitHub Desktop.

Select an option

Save ldesgoui/5720bd5a6a84f38b7bb4387f72acbc9a to your computer and use it in GitHub Desktop.
prototype
meta:
engine: 4.1.0
points:
zones:
matrix:
anchor:
shift: [180,-160] # Fix KiCad placement
columns:
inner:
index:
key.stagger: 1/8u
middle:
key.stagger: 2/5u
ring:
key:
splay: -4
stagger: -1/2u
pinky:
key:
splay: -8
stagger: -7/8u
outer:
key.stagger: -1/2u
rows.numbers.skip: true
rows:
bottom:
home:
top:
numbers:
thumb:
anchor:
ref: matrix_index_bottom
rotate: 90-12
shift: [3/4u, -7/6u]
columns:
thumb.key:
orient: 15
padding: u+4
adjust:
rotate: -90-6
rows:
numbers:
top:
home:
bottom:
pmos-inner:
columns.inner.key: { width: 8, height: 4, autobind: 0 }
anchor:
ref: "matrix_inner_bottom"
shift: [0, -u/2]
pmos-index:
columns.index.key: { width: 8, height: 4, autobind: 0 }
anchor:
ref: "matrix_index_bottom"
shift: [0, -u/2]
pmos-middle:
columns.middle.key: { width: 8, height: 4, autobind: 0 }
anchor:
ref: "matrix_middle_bottom"
shift: [0, -u/2]
pmos-ring:
columns.ring.key: { width: 8, height: 4, autobind: 0 }
anchor:
ref: "matrix_ring_bottom"
shift: [0, -u/2]
pmos-pinky:
columns.pinky.key: { width: 8, height: 4, autobind: 0 }
anchor:
ref: "matrix_pinky_bottom"
shift: [0, -u/2]
pmos-outer:
columns.outer.key: { width: 8, height: 4, autobind: 0 }
anchor:
ref: "matrix_outer_bottom"
shift: [-2/3u, -u/4]
pmos-thumb:
columns.thumb.key: { width: 8, height: 4, autobind: 0 }
anchor:
ref: "thumb_thumb_home"
shift: [0, u/2]
xiao:
key:
width: 17.8
height: 21
autobind: 0
anchor:
ref: "matrix_inner_numbers"
shift: [-24, 0]
adc-filter-numbers:
rows.numbers.key: { width: 8, height: 4, autobind: 0 }
anchor:
ref: "matrix_inner_numbers"
shift: [-1/2u, 1/4u]
adc-filter-top:
rows.top.key: { width: 8, height: 4, autobind: 0 }
anchor:
ref: "matrix_inner_top"
shift: [-1/2u, 1/4u]
adc-filter-home:
rows.home.key: { width: 8, height: 4, autobind: 0 }
anchor:
ref: "matrix_inner_home"
shift: [-1/2u, 1/4u]
adc-filter-bottom:
rows.bottom.key: { width: 8, height: 4, autobind: 0 }
anchor:
ref: "matrix_inner_bottom"
shift: [-1/2u, 1/4u]
outlines:
_key_negative:
- what: rectangle
where: &key
- /^matrix_.*/
- /^thumb_.*/
size: 14
_mount:
- what: path
segments:
- type: line
points:
- ref: thumb_thumb_bottom
shift: [-9, 9]
- ref: thumb_thumb_bottom
shift: [-9, -9]
- type: bezier
points:
- ref: thumb_thumb_home
shift: [10, -3]
- ref: thumb_thumb_numbers
shift: [-15, -3]
- ref: matrix_outer_bottom
shift: [9, -9]
- type: line
points:
# - ref: matrix_outer_bottom
# shift: [9, -9]
- ref: matrix_outer_top
shift: [9, 9]
- type: bezier
points:
- ref: matrix_pinky_numbers
shift: [9, 30]
- ref: matrix_middle_numbers
shift: [0, 30]
- ref: matrix_inner_numbers
shift: [-9, 9]
- type: line
points:
- ref: matrix_inner_bottom
shift: [-9, -16]
- type: bezier
points:
- ref: thumb_thumb_bottom
shift: [12, 12]
- ref: thumb_thumb_bottom
shift: [-9, 9]
mount:
- _mount
- -_key_negative
pcb:
- _mount
- what: polygon
where: /^xiao/
adjust:
shift: [-17.8/2-2, 21/2]
points:
- shift: [0, -100]
- shift: [30, 0]
- shift: [0, 100]
- shift: [-30, 0]
cases:
mounting_plate:
- what: outline
name: mount
extrude: 1.2
pcbs:
mounting_plate:
template: kicad8
references: false
outlines:
ref:
outline: mount
testies:
template: kicad8
references: false
outlines:
ref:
outline: pcb
footprints:
xiao:
what: xiao
where: /^xiao/
params:
reversable_pins: 7
P0: pre_adc_numbers
P1: pre_adc_top
P2: pre_adc_home
P3: pre_adc_bottom
P4: sel_inner
P5: sel_index
P6: sel_middle
P7: sel_ring
P8: sel_pinky
P9: sel_outer
P10: sel_thumb
V3: '+3.3V'
GND: GND
adc-filter-res-f:
what: res0805
where: /^adc-filter-.*/
params:
value: 100
from: pre_adc_{{row}}
to: adc_{{row}}
adc-filter-res-b:
what: res0805
where: /^adc-filter-.*/
params:
side: B
value: 100
from: pre_adc_{{row}}
to: adc_{{row}}
adc-filter-res-via-pre:
what: via
where: /^adc-filter-.*/
adjust:
shift: [-1.0375, 0]
params:
net: pre_adc_{{row}}
adc-filter-res-via-post:
what: via
where: /^adc-filter-.*/
adjust:
shift: [1.0375, 0]
params:
net: adc_{{row}}
adc-filter-cap-f:
what: cap0805
where: /^adc-filter-.*/
adjust:
shift: [0, -4]
params:
value: 10n
from: pre_adc_{{row}}
to: GND
adc-filter-cap-b:
what: cap0805
where: /^adc-filter-.*/
adjust:
shift: [0, -4]
params:
side: B
value: 10n
from: pre_adc_{{row}}
to: GND
adc-filter-cap-via-pre:
what: via
where: /^adc-filter-.*/
adjust:
shift: [-1.0375, -4]
params:
net: pre_adc_{{row}}
adc-filter-cap-via-post:
what: via
where: /^adc-filter-.*/
adjust:
shift: [1.0375, -4]
params:
net: GND
pmos-f:
what: sot-23
where: /pmos-.*/
params:
top: 'sel_{{col.name}}'
bottom: '+3.3V'
across: 'vcc_{{col.name}}'
pmos-b:
what: sot-23
where: /pmos-.*/
params:
side: B
top: 'sel_{{col.name}}'
bottom: '+3.3V'
across: 'vcc_{{col.name}}'
pmos-via-gate:
what: via
where: /pmos-.*/
adjust:
shift: [-1.1375, 0.95]
params:
net: 'sel_{{col.name}}'
pmos-via-source:
what: via
where: /pmos-.*/
adjust:
shift: [-1.1375, -0.95]
params:
net: '+3.3V'
pmos-via-drain:
what: via
where: /pmos-.*/
adjust:
shift: [-1.1375, 0]
params:
net: 'vcc_{{col.name}}'
pmos-skip-jumper-f:
what: myjumper
where: /pmos-.*/
adjust:
shift: [4, 0]
rotate: -90
params:
from: 'sel_{{col.name}}'
to: 'vcc_{{col.name}}'
pmos-skip-jumper-b:
what: myjumper
where: /pmos-.*/
adjust:
shift: [4, 0]
rotate: -90
params:
side: B
from: 'sel_{{col.name}}'
to: 'vcc_{{col.name}}'
pmos-skip-via-sel:
what: via
where: /pmos-.*/
adjust:
shift: [4, 0.65]
params:
net: 'sel_{{col.name}}'
pmos-skip-via-vcc:
what: via
where: /pmos-.*/
adjust:
shift: [4, -0.65]
params:
net: 'vcc_{{col.name}}'
mx-he:
what: mx-he
where: &key
- /^matrix_.*/
- /^thumb_.*/
tmr-sensor-f:
what: sot-23
where: *key
adjust:
rotate: 90
params:
top: 'vcc_{{col.name}}'
bottom: GND
across: 'signal_{{colrow}}'
tmr-sensor-b:
what: sot-23
where: *key
adjust:
rotate: 90
params:
side: B
top: 'vcc_{{col.name}}'
bottom: GND
across: 'signal_{{colrow}}'
tmr-sensor-via-gnd:
what: via
where: *key
adjust:
shift: [0.95, -1.1375]
params:
net: 'GND'
tmr-sensor-via-out:
what: via
where: *key
adjust:
shift: [0, -1.1375]
params:
net: 'signal_{{colrow}}'
tmr-sensor-via-gate:
what: via
where: *key
adjust:
shift: [-0.95, -1.1375]
params:
net: 'vcc_{{col.name}}'
key-resistor-f:
what: res0805
where: *key
adjust:
shift: [0, -4]
rotate: -90
params:
value: 1k
from: 'signal_{{colrow}}'
to: 'adc_{{row}}'
key-resistor-b:
what: res0805
where: *key
adjust:
shift: [0, -4]
rotate: -90
params:
side: B
value: 1k
from: 'signal_{{colrow}}'
to: 'adc_{{row}}'
key-resistor-via-out:
what: via
where: *key
adjust:
shift: [0, -3.0375]
params:
net: 'signal_{{colrow}}'
key-resistor-via-adc:
what: via
where: *key
adjust:
shift: [0, -5.0375]
params:
net: 'adc_{{row}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment