Presenting the KiPad - a custom macro keypad for the popular open-source PCB design software KiCad.
KiCad is awesome! But I've found that during PCB layout, my right hand is constantly moving back-and-forth between the keyboard and mouse - to execute hotkey commands or use the arrow-keys. That's where KiPad comes in. The KiPad is equipped with a 16 keys and three rotary encoders, each programmed with a specific KiCad hotkey combination. This means common functions and arrow keys are all accessible to the left hand, leaving the right hand on the mouse.
Commands available:
- Lay tracks
- Drag tracks
- Change layers
- Measure
- Set grid origin
- High-contrast mode (toggle)
- Rotate
- Move
- Shift, Ctrl and Arrow Keys
- Undo / Redo
- Enter / Delete
- Escape key
- Tab Key
- Media (Play/Pause, Volume, next song)
- Grid-size Knob
- Track size Knob
Bill of materials
- Teensy 3.2
- 16x Cherry MX Blue switches
- 16x Keycaps
- 3x Rotary encoders
- Heat-set threaded inserts
- M3 screws + standoffs
- 3D printed case (Core have a print service if you don't have access to a 3D printer)
- PCB - the design is included and there are plenty of maker-friendly PCB factories: OSHPark, PCB Way, JLC etc.
All the project files are attached at the bottom of this project.
The assembly process is captured in the video for this project. I'll include a few notes below for what didn't make it in.
Assemble the PCB
Poetically, the PCB is designed in KiCad. The design presented here is as-is from the video - bugs and all. Be careful or you'll be up for some bodge-wiring like I was. I ended up changing which pins the matrix is connected to, these are defined in the source code.
Not mentioned in the video is a bodge wire to one of the rotary encoders.
PCB assembly is pretty straight forward, the Cherry keys fit beautifully. I had to trim the potentiometer posts to fit the footprint that I chose. As you can see in the video, there was some serious rework done to connect the key matrix to the Teensy.
The Cherry switches are very satisfying to fit. They have locating pins that keep them precisely located.
Soldering the addressable LEDs
The footprint I selected for the rotary encoders is almost right. I had to trim the support tabs on mine.
Print the Case
The case is a two-piece printed shell. I printed the red top from Ultimaker Tough Red PLA and the black rear-cover from Ultimaker ABS. A high infill (~80%) makes the case very rigid and gives it a bit of weight.
The back cover features four additional holes for printing and securing feet to angle the KiPad if you so desire.
Assembly
With a soldering iron on low heat, press the threaded inserts into the mounting bosses. The bosses are dimensioned so as not to leave plastic on the iron tip that pokes through - though be careful. You can also prefit a fastener to the insert to heat the insert indirectly - but I found this slower and more difficult.
The PCB is held into the case by nylon standoffs. The standoffs also serve as mounting bosses for the rear cover. My case design has a taper; the section closest to the user is much thinner, so I had to hand-cut some of the standoffs to accommodate the smaller space.
Firmware
The firmware for this project is ever-evolving as I rearrange the keys. To flash the Teensy you'll need the Arduino IDE and the Teensyduino package, which contains the board profiles and extra cool libraries.
Conclusion and Possible Improvements
The KiPad is a functional macro keypad that you can deploy as-is for KiCad or modify for any software of your choosing. There are a few bugs, namely to do with the holding/releasing of the Shift key (Row 3, Col 1) and/or Ctrl key (Row 4, Col 1).
The bugs on the circuit board are left as-is. If you tackle this project I'd recommend repinning the Teensy to make connections to the matrix keypad and the rotary encoder.