

Petrock-40
Custom Keyboard
- Size
- 242.5 × 87.9 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 102
- Nets
- 94
- Pads
- 570
- Tracks, vias
- 542, 261
- Pours
- 8
- Routed
- Yes
- KiCad
- KiCad 10.0 (file 20260206)
- Created
- 4 Oct 2026
- Updated
- 6 Oct 2026
Overview
Petrock-40 is an open-source printed circuit board by dycli, from the dycli/petrock repository on GitHub. It is a 2-layer board of 242.5 × 87.9 mm with 102 parts on 94 nets, routed with 542 tracks and 261 vias.
Its parts include 40 diodes, 40 switches, 4 connectors and 2 ICs. It belongs with the keyboards and input boards and the AVR (ATmega, ATtiny) boards of this library.
README
README.mdPetrock
A split choc keyboard with a trackpoint in place of an outer thumb key: Petrock-41 has one, at the right thumb; Petrock-40 has one on each half; Petrock-42 has none, a key at both outer thumbs.
Based on holykeebs' Corne Choc PCB and plate from
idank/keyboards (corne/choc, commit
f149b9b), licensed CC-BY-SA-4.0. This derivative uses the same licence.
Changes from the Corne Choc
The board is built from the stock file: its parts move to the new layout, and every wire is then drawn afresh by rule (see Build). The stock schematic's connections stay, apart from the thumbs' columns (see Firmware).
- No lighting. Every per-key and underglow LED, the LED supply diodes and
the LED wiring are gone (
tools/no_leds.py). An RGB version may follow. - Exact stagger. Rows exactly 17 mm apart, each column's top key a whole
number of 2.37 mm steps below the middle finger's (
tools/stagger.py; stock is off by up to 0.02 mm). - Five columns. The outer pinky column goes. The pinky column moves up to one step below the ring column and gains a fourth key (the old outer top key); the ring column gains one too (the old outer bottom key). Each joins the column wire it lands on, in the thumb row (row 3).
- Thumb cluster. Each thumb key turns 15 degrees from its neighbour about a
hinge where their facing corners sit 0.5 mm apart, starting from the bottom
inner-index key (
tools/thumbs.py). The 1.5u inner key becomes two 1u keys; the new upper one takes the thumb row's last free column (col 0). - Trackpoint. Sprintek SK8707-01-004 at the outer thumb key: sensor on the
front, nub centred on where the key was, driver on the back, PS/2 clock and
data on controller pins 1/2, 3.3 V from the OLED header; sensor A1/A3, controller
board A2/A4 (
tools/outer_thumb.py, footprints fromtools/make_footprints.py). - Pins for wireless. Pins 1/2 are a nice!nano's high-frequency D1/D0, which
the ZMK PS/2 driver recommends (lower-frequency pins can disturb Bluetooth);
the TRRS data line moves from pin 2 to pin 11 to free them (
tools/pins.py). - Outline. Drawn from the keys (
tools/outline.py): a flat top 1.15 mm above the middle column, 7.5-degree slopes to either side, a straight outer side, one 7.5-degree bottom edge, and the inner side widened for the upper thumb key (tools/widen.py). Keycaps sit 1.15 mm from the edge wherever it follows them. - Controller corner. Across the strip between the inner index keycaps
and the inner edge, the controller (a nice!nano's 17.78 mm board) and the
jack's 6 mm body sit with three even 1.63 mm gaps; each drops until its square
top corner is 1.15 mm inside the inner slope, like the keycaps. The USB-C and
the jack's barrel overhang. The reset button sits under the jack
(
tools/inner_strip.py). - The holykeebs and Corne logos and holykeebs' revision stamp are removed; the back
carries the short hash of the commit the board was built from, between each
controller's pin rows (
tools/stamp.py; the build won't stamp uncommitted scripts); the board and the switch plates carry the Petrock logo with a 7 mm dot in its notch (tools/logo.py), and the jack, reset button and OLED header have no printed outlines (tools/quiet_silk.py). - Five standoffs per half, as stock, placed by geometry (
tools/standoffs.py): four where four keys meet, each at the four keys' centre, forming a 54 x 34 mm rectangle (pinky and ring columns, and index and inner index columns, each between their top two rows and below their third); and one at the thumbs, equally far from its three keycap corners. A key diode may move a fraction to make room, if it stays clear. The switch plate has a screw hole over each (tools/plate.py), as stock. - Plates regenerated (
tools/plate.py): the right one (both, on Petrock-40; neither, on Petrock-42) has an opening for the trackpoint sensor; a new FR4 bottom plate fits the outline.
Build
tools/build.sh [single|dual|none] regenerates a board from the stock file:
- Place: strip the lighting, then move every part to the layout
(
tools/parts.py drag). - Route by rule (
tools/route.py), as a careful hand would: each column a straight line up the front through its switch pins; each row a line along the back under its keys, stepping 45 degrees in the gap between columns; every diode in the same place beside its key with the same two short links; the column wires gathered into an evenly spaced bus in the gap under the middle row and fanned into the controller in a staircase; the trackpoint wires and power in a bundle up the lane between the middle and index columns and along the top edge; every bend 45 degrees, no right angles except where a wire joins another. Then ground is poured on both sides and stitched together with vias (tools/stitch.py). - Check: the build fails unless DRC finds nothing but the stock footprints' library notices and every connection is made.
Then tools/plates.sh makes the plates (order the switch plates at 1.2 mm,
which choc switches clip into; the main board and bottom plate at 1.6 mm; all
in HASL, the cheapest finish: the trackpoint driver's pads are hand-soldered
and wide enough that ENIG's flatness isn't needed)
and the 1:1 printout (print it with
scaling off, e.g. lp -o print-scaling=none). tools/fab.sh [single|dual|none]
writes Gerber and drill zips and JLC's assembly BOM and placement (diodes and
hot-swap sockets) to fab/; tools/demo.sh renders demo/. All need KiCad 10.
Outputs: pcb/petrock-41*.kicad_pcb and pcb/bottom.kicad_pcb;
pcb/dual/petrock-40*.kicad_pcb and pcb/dual/bottom.kicad_pcb;
pcb/none/petrock-42*.kicad_pcb and pcb/none/bottom.kicad_pcb.
Assembly
The stack, per standoff: a top screw through the switch plate's 2.1 mm hole into a spacer that passes through the main board's 3.1 mm hole down to the bottom plate, where a bottom screw holds it. The switch plate and bottom plate clamp the spacers; the main board hangs from the switches (clipped into the plate, pins in the hot-swap sockets), 1.0 mm under the plate.
- 10 round M2 x 5 mm female-female spacers, 3.0 mm across (knurled brass ones are common; hex ones don't pass the 3.1 mm holes). 5 mm, not holykeebs' 4 mm: it leaves 2.4 mm under the main board for the sockets (1.85 mm) and the trackpoint drivers (about 2.1 mm).
- Top screws (they sit on the plate, beside the switches): the four where four keys meet sit between switch housings (15 mm square on an 18 x 17 mm grid), so their heads must be about 3.0 mm across or less: M2 low small-head socket screws (e.g. MISUMI's; check the listed head diameter), or M1.6 socket caps (3.0 mm heads) with M1.6 spacers at those four. The thumb one and the 10 underneath: ordinary low M2 x 3 mm screws (e.g. ISO 7380, holykeebs').
- Order: spacers up through the main board, bottom plate on; switch plate on and its screws in; then the switches, which draw the main board up as they seat.
- Rubber feet: near the standoffs, and two along the bottom edge (by the outer corner and under the trackpoint), which has no standoff.
Firmware
- Matrix (each half, right with
_rnets): rows 0-2 are the three full rows, columns 1-5 pinky to inner index. Row 3 is the bottom pinky key (col 1), the bottom ring key (col 2) and the thumbs, outer to inner: col 3, col 4, col 5. Col 0 is unused, except on a half with four thumbs (the 41's left, both of the 42's): there the extra outermost one (in the trackpoint's place) is col 3, the next two col 4 and col 5, and the innermost col 0. - Wired (QMK, RP2040 Pro Micro): split serial on pin 11 (
SOFT_SERIAL_PIN GP8, PIO driver); PS/2PS2_CLOCK_PIN GP0,PS2_DATA_PIN GP1(PIO driver). - Wireless (ZMK, nice!nano): PS/2 clock D1 (P0.06), data D0 (P0.08), e.g. with infused-kim's PS/2 mouse driver; the trackpoint's driver board resets itself, so no reset pin. It draws power from the controller's VCC pin, which ZMK's external-power control switches off in sleep. The battery solders to the nice!nano's B+/B- pads (no switch on the board). The jack isn't used.
- The sensor's pad edge faces the controller (if the axes come out turned, rotate them in firmware). No RGB.
Open items
- Driver footprint: Sprintek doesn't draw the detached driver on its own. Its outline and sensor-link pads follow the integrated-module drawing. Its host pins disagree between the drawing (1.80 mm pitch) and holykeebs' product photos (1.72 mm), so their pads fit both: 1.758 mm pitch about the row's shared middle, every pin within 0.21 mm of its pad's centre either way. Check a real driver against the footprint before ordering boards.
- Under-board height: check that the driver (about 2 mm) clears the bottom plate.
- Standoff length for the plate/PCB/bottom sandwich (M2 3 mm both sides expected for the 1.6 mm FR4 bottom).
- Schematic: still the Corne Choc's.
Parts
102| Qty | Value | Footprint | References |
|---|---|---|---|
| 40 | D | kbd:D3_SMD_v2 | D1, D2, D10, D11, D12, D13, D14, D15, D16, D17, D18, D20, D21, D22, D23, D24 +24 |
| 40 | SW_PUSH | holykeebs:SW_choc_v1_HS_CPG135001S30_1u | SW1, SW2, SW10, SW11, SW12, SW13, SW14, SW15, SW16, SW17, SW18, SW20, SW21, SW22, SW23, SW24 +24 |
| 8 | h2 | holykeebs:M2_SPACER | h2, h2, h2, h2, h2, h2, h2, h2 |
| 2 | M2_SPACER | holykeebs:M2_SPACER | , |
| 2 | MJ-4PP-9 | kbd:MJ-4PP-9_1side | J1, J3 |
| 2 | OLED | holykeebs:OLED_1side_1mm_holes | J2, J4 |
| 2 | ProMicro | holykeebs:ProMicro_1mm_holes | U1, U2 |
| 2 | SK8707-01 driver | SK8707-01_driver | A2, A4 |
| 2 | SK8707-01 sensor | SK8707-01_sensor | A1, A3 |
| 2 | SW_PUSH | kbd:ResetSW_1side | RSW1, RSW2 |
More from dycli/petrock
1- 2 layers242.5 × 87.9 mm

Similar boards
- 2 layers208.7 × 393.8 mm

Ferris
pierrechevalier83/ferris
A low profile split keyboard designed to satisfy one single use case elegantly
102 parts1.3k - 2 layers100 × 94.2 mm

- 2 layers107.5 × 2.5 mm

ESP32Clock
hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!
102 parts915 - 2 layers110.3 × 171.8 mm

- 2 layers172 × 152.9 mm

- 2 layers118.1 × 101.6 mm

Teensy eurorack
newdigate/teensy-eurorack
Hardware Design: Eurorack shield for teensy 4.1 with 14 in / 16 out analog channels
102 parts259MIT - 2 layers157.5 × 115.8 mm

- 2 layers75.2 × 61.1 mm

Questions
How big is the Petrock-40 PCB?
It measures 242.5 × 87.9 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Petrock-40 use?
102 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
Where can I download the Petrock-40 KiCad files?
From the dycli/petrock repository on GitHub, at the commit this page was made from: the board is pcb/dual/petrock-40.kicad_pcb and its schematic pcb/petrock-41.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Petrock-40 design in my own project?
Its repository states no licence, so its author keeps all rights: ask dycli before reusing the design.