Building a Custom Mechanical Keyboard: A Project Log
I've been wanting to build a custom mechanical keyboard for years. Not just assembling a kit—I wanted to design and build one from scratch. This is the story of that journey.
The Vision
I wanted a keyboard that:
- **Split design**: Better ergonomics
- **Ortholinear layout**: Straight columns instead of staggered
- **40% size**: Compact but functional
- **Hot-swappable**: Easy to change switches
- **3D printed case**: Custom design
- **QMK firmware**: Fully programmable
Phase 1: Design
Layout Planning
I started by mapping out my ideal layout. After using a 60% keyboard for years, I knew which keys I actually used. I settled on a 40% ortholinear split with:
- 4x6 grid per half
- 3 thumb keys per hand
- Total: 54 keys
I used [Keyboard Layout Editor](http://www.keyboard-layout-editor.com/) to visualize and iterate on the design.
3D Modeling
With the layout decided, I fired up Fusion 360. The case design went through several iterations:
Version 1: Too thick, poor key spacing
Version 2: Better, but switch mounting was weak
Version 3: Refined everything, added mounting posts
Final: Added cable routing channels and wrist rest angle
Key design considerations:
- Switch plate needs to be 1.5mm thick
- Switches require 14mm x 14mm cutouts
- 19mm spacing between switches (standard)
- 5-degree typing angle for comfort
Electronics Planning
For a hand-wired keyboard, I needed:
- 2x Arduino Pro Micro (one per half)
- 54x Cherry MX switches
- 54x 1N4148 diodes
- Magnet wire for matrix
- TRRS cable for split communication
- USB-C to micro-USB cable
I mapped out the matrix: 4 rows × 6 columns per half = 10 pins per controller.
Phase 2: Printing
I printed the case in PETG for durability. The print took 3 days:
- Left case: 14 hours
- Right case: 14 hours
- Switch plates: 3 hours each
- Wrist rests: 4 hours each
Print settings:
- Layer height: 0.2mm
- Infill: 20%
- Supports: Only for cable channels
- Temperature: 240°C
The first print had some issues—I needed to adjust support settings for the switch mounting posts. The second attempt was perfect.
Phase 3: Assembly
Preparing the Switches
I decided on Gateron Yellow switches (linear, smooth, budget-friendly). I:
1. Lubed the springs with Krytox 105
2. Lubed the stems with Krytox 205g0
3. Installed them in the switch plate
This took about 3 hours of podcast listening.
Hand-Wiring the Matrix
This was the most tedious part. Hand-wiring a keyboard matrix means:
1. Bend and solder diodes to each switch
2. Wire rows together with magnet wire
3. Wire columns together
4. Connect everything to the Arduino
Pro tips I learned:
- Use 30 AWG magnet wire (easier to work with)
- Tin the wire before soldering
- Test continuity as you go
- Take breaks (your eyes will thank you)
Total wiring time: About 12 hours over 3 days.
Controller Installation
I mounted the Pro Micros on the back of each half and soldered the matrix rows and columns to the corresponding pins. I added strain relief for the TRRS connections.
Phase 4: Programming
QMK Setup
QMK firmware is incredibly powerful but has a learning curve. I:
1. Cloned the QMK repository
2. Set up the development environment
3. Created a custom keyboard definition
4. Mapped out layers and functions
Layer Design
With only 54 keys, layers are essential. My setup:
Layer 0 (Base): Alphas and common punctuation
Layer 1 (Lower): Numbers and symbols
Layer 2 (Raise): Function keys and navigation
Layer 3 (Adjust): RGB control and system functions
Custom Features
I implemented:
- Tap-dance keys (tap for one thing, hold for another)
- Home row mods (hold for modifier, tap for letter)
- Custom macros for common coding patterns
- LED underglow with reactive modes
Phase 5: Testing and Refinement
Initial Testing
The first time I plugged it in... nothing. Panic!
After debugging:
- Fixed a cold solder joint on column 4
- Corrected a pin mapping error in firmware
- Added debounce timing adjustment
Second attempt: Success! All keys registered.
Typing Experience
The first few days were rough. My WPM dropped from 80 to about 30. But I stuck with it, and after two weeks:
- WPM back to 75
- More comfortable hand position
- Fewer typos
- Better posture
Iterations
Things I changed after initial testing:
- Added rubber feet for better grip
- Increased typing angle by 2 degrees
- Adjusted firmware debounce settings
- Changed thumb key mapping
Phase 6: Finishing Touches
Keycaps
I went with blank XDA profile keycaps in a minimalist gray and white colorway. The flat profile works great with the ortholinear layout.
Cable
I made a custom coiled USB cable:
- Paracord sleeving
- Matching gray and white colors
- 6-inch coil
- USB-C to USB-A
Desk Mat
To complete the setup, I designed a custom desk mat with a simple geometric pattern that matches the keyboard aesthetic.
The Results
What I Learned
- **Patience**: Hand-wiring requires patience and attention to detail
- **Iteration**: The first design is never the final design
- **Debugging**: Systematic troubleshooting saves time
- **Ergonomics**: Small improvements make a big difference
Cost Breakdown
- Arduino Pro Micros: $16
- Switches: $18
- Diodes and wire: $8
- PETG filament: $12
- Keycaps: $45
- Misc (cable, connectors): $15
- **Total**: $114
Compare this to buying a similar custom keyboard: $250-400.
Time Investment
- Design: 8 hours
- Printing: 3 days (mostly unattended)
- Assembly: 20 hours
- Programming: 6 hours
- Testing and refinement: 10 hours
- **Total**: ~44 hours of active work
Would I Do It Again?
Absolutely! This project taught me so much:
- 3D design and printing
- Electronics and soldering
- Firmware programming
- The value of iteration
The keyboard is now my daily driver, and I love knowing that I built every part of it. The satisfaction of typing on something you designed and assembled yourself is hard to beat.
Future Plans
I'm already thinking about version 2:
- Wireless with Nice!Nano controllers
- Hot-swap sockets (no more soldering!)
- Rotary encoders for volume and scrolling
- Better wrist rests with memory foam
- Maybe even per-key RGB?
Resources
If you want to build your own:
Design:
- Keyboard Layout Editor
- [Plate & Case Builder](http://builder.swillkb.com/)
- Fusion 360 (free for personal use)
Electronics:
- [QMK Firmware](https://qmk.fm/)
- Hand Wiring Guide (on /r/MechanicalKeyboards)
- Sparkfun's Soldering Tutorial
Community:
- r/MechanicalKeyboards
- r/ErgoMechKeyboards
- Discord: MechKeys server
- Geekhack forums
Conclusion
Building a custom keyboard is a fantastic project that combines design, engineering, and craftsmanship. It's challenging but incredibly rewarding.
If you're considering it, my advice: just start. You'll make mistakes, but that's how you learn. The journey is as valuable as the destination.
Plus, you'll have the coolest keyboard at work or school!
Questions? Want to see more photos? Interested in the files? Let me know in the comments!