Hackpad
Design your case
Your macropad needs a case to hold everything together. You’ll design a sandwich-style case: a bottom shell and a top plate with cutouts for the switches.
Tools
- Fusion 360 — free for personal use. Download from autodesk.com/products/fusion-360.
- ai03 Plate Generator — generates switch cutout patterns: kbplate.ai03.com.
1. Design the top plate
The top plate has square cutouts where the switches snap in.
- Go to kbplate.ai03.com.
- Paste your keyboard layout data. For a 3-key row:
["","",""]. For a 4×4 grid:["","","",""], ["","","",""], ["","","",""], ["","","",""] - Download the DXF file.
- In Fusion 360, create a new design and import the DXF as a sketch.
- Extrude the plate to 3mm thickness.
2. Design the bottom case
- Start a new sketch. Draw a rectangle matching your PCB dimensions plus 0.4mm tolerance on each side (so 0.8mm wider and taller total).
- Draw a larger rectangle around it with 10mm margin — this creates the walls.
- Extrude the base by 3mm.
- Extrude the walls by 10mm (13mm total height from the bottom).
- Add a USB-C cutout on the edge where the XIAO’s port sits.
3. Add mounting holes
You need holes to screw the plate to the bottom case. Place them in the corners and optionally along edges:
- Heatset insert holes (in the bottom case): 4.7mm diameter, 4mm deep — the M3×5×4mm heatset inserts press into these.
- Screw pass-through holes (in the plate): 3.4mm diameter — the M3×16mm screws go through these into the heatset inserts below.
4. Export your case files
Export each part as a separate .STEP file (File → Export → .STEP):
Top.STEP— the switch plateBottom.STEP— the bottom shell
Write your firmware
Firmware is the code that tells your macropad what each key does. You have three options:
Option A: KMK (easiest — Python)
KMK runs on CircuitPython. You write a single main.py file and drop it onto the XIAO like a USB drive.
- Install CircuitPython on your XIAO RP2040 (hold the BOOT button while plugging in USB, then drag the CircuitPython
.uf2file onto the drive that appears). - Install KMK by copying the
kmkfolder onto the CIRCUITPY drive. - Create
main.py:
import board
from kmk.kmk_keyboard import KMKKeyboard
from kmk.keys import KC
from kmk.scanners import DiodeOrientation
keyboard = KMKKeyboard()
# Define your matrix pins (adjust to match your wiring)
keyboard.col_pins = (board.D0, board.D1, board.D2)
keyboard.row_pins = (board.D3,)
keyboard.diode_orientation = DiodeOrientation.COL2ROW
# Define what each key does
keyboard.keymap = [
[KC.A, KC.B, KC.C],
]
if __name__ == "__main__":
keyboard.go()
Option B: QMK (most features — C)
QMK is the industry standard for custom keyboards. It supports layers, tap-dance, OLED displays, RGB effects, and VIA (a GUI for remapping keys).
Follow the official porting guide: docs.qmk.fm/porting_your_keyboard_to_qmk
You’ll create a keyboard definition folder with:
info.json— matrix layout, pin assignments, USB IDskeymap.c— your default keymaprules.mk— feature flags (OLED, encoder, RGB, etc.)
Option C: ZMK (wireless-focused)
ZMK is best for wireless keyboards, but works fine wired too. See zmk.dev/docs.
Encoder support
All three firmware options support rotary encoders. You’ll map the twist action to volume up/down, scrolling, or anything else:
- QMK:
ENCODER_MAP_ENABLEinrules.mk - KMK:
from kmk.modules.encoder import EncoderHandler - ZMK:
&sensorsin your.keymapfile
OLED support
If you’re using the OLED display, you can show text, battery status, current layer, or animations. QMK’s OLED driver is the most mature — it supports custom graphics and animations like the famous Bongo Cat.
Put together your submission
Your project needs to be in a GitHub repository with this folder structure:
your-macropad/
├── README.md
├── CAD/
│ └── assembled-model.STEP
├── PCB/
│ ├── your-project.kicad_pro
│ ├── your-project.kicad_sch
│ └── your-project.kicad_pcb
├── Firmware/
│ └── main.py (or QMK source folder)
└── production/
├── gerbers.zip
├── Top.STEP
├── Bottom.STEP
└── firmware.uf2 (or main.py)
Your README should include
- A screenshot or render of your macropad design
- A screenshot of your schematic
- A screenshot of your PCB layout
- A screenshot of your case in 3D
- A bill of materials listing every component
Pre-submission checklist
- PCB is 100mm × 100mm or smaller (2-layer)
- Case fits within 200mm × 200mm × 100mm
- Case is fully 3D-printable (no acrylic, laser-cut, or CNC parts)
- Only using parts from the kit (or buying extras yourself)
- Gerber files are exported and zipped
- Case parts exported as .STEP files
- Firmware compiles and is included in the repo
- Heatset insert holes are 4.7mm diameter
- Screw holes have clearance (3.4mm for pass-through)
- 0.2mm tolerance on mating surfaces
- USB-C port has a cutout in the case
- README has screenshots and BOM
Submit your project
Once everything is in your GitHub repo:
- Post your project in #hackpad-ships on the Hack Club Slack.
- Fill out the submission form at forms.hackclub.com/hackpad-submission.
A reviewer will check your design. If approved, your kit ships and you’ll get card grants for the PCB and soldering iron. Your case goes to Printing Legion for 3D printing.
Troubleshooting & resources
KiCad resources
Fusion 360 resources
Firmware resources
Key measurements for reference
| Measurement | Value |
|---|---|
| MX switch center-to-center spacing | 19.05mm |
| MX switch cutout size | 14mm × 14mm |
| Heatset insert hole diameter | 4.7mm |
| Heatset insert hole depth | 4mm |
| Screw pass-through hole diameter | 3.4mm |
| 3D print tolerance gap | 0.2mm |
Getting help
Stuck? Ask in #hackpad on the Hack Club Slack. Post your schematic or PCB screenshot and describe what’s going wrong — the community is friendly and fast.