Build, Keyboard
Sometime last year I came across this talk given by Matt Adereth about using Clojure to generate firmware for custom built keyboards.
Although the talk is given at a Clojure conference, I think it’s worth a listen for anyone who programs or is technically inclined.
In the talk Matt explains why the keyboards we most commonly use today (QWERTY) look the way they do. For example, he mentions that the arrangement of keys on a QWERTY keyboard is such that the keys closest together on the keyboard are less likely to be next to each other in common English words. He also mentions that keys are staggered in modern keyboards, based on the staggered format in type writers. This is because staggered keys cause less collisions in between the rods that extend from the base of the keys in type writers.
He then goes on to talk about building custom keyboards that make more sense in today’s world rather than key boards not based on 1800's technology.
After listening to this talk, and endlessly scrolling r/olkb, I decided that building my own keyboard was a worthwhile pursuit for the following reasons:
Optimization. As a software developer, I use my keyboard a lot. Given that this is a tool I use everyday, even small gains in efficiency could speed up my work and reduce the time on feedback cycles between thinking and writing code.
Improved ergonomics. I was already looking for an ergonomic keyboard since repetitive strain injuries are fairly common for software developers. The few commercially available models were quite expensive (e.g. the kineses for $300+). I figured if I could build my own keyboard, I could create something with really good ergonomics.
An often repeated joke about 3D printers is that once you get one, you spend all of your time printing enhancements for the 3D printer while never making anything else of use. So, I figured it was about time to use the thing to make something useful besides more printer mods.
With the decision to build a custom keyboard made, I though more about what features I wanted in a keyboard:
The keyboard must be ortho-linear (keys are placed in straight lines, rather than staggered rows). Our fingers move in straight lines when we stretch and contract them so it makes more sense to have a keyboard with straight columns and rows. Try contracting and extending your fingers, you’ll see what I mean.
The keyboard must be split. Split keyboards allow you to adjust your wrist and arm angles to whatever position is comfortable for your body. Normal keyboards force you to apply stress throughout your arm to properly fit the keys.
The keyboard must have thumb clusters. Thumbs are far stronger and more flexible than the non-thumb fingers because of the joint at the base of the thumb (the first carpometacarpal joint). Thumb clusters allow you to shift some buttons away from your non-thumb fingers over to your thumbs. This increases ergonomics and is also far more efficient than standard keyboards. (Post build, I can report that I have been able to use my thumbs for the following keys: Shift, Tab, [ , ] , { , } , | , ,`, ~, Return, Delete and more. No more pinky strain for me!)
(Optional) The keyboard should follow the curvature of the hand. Flat keyboards make zero sense if you look at how your hands are actually shaped. Curved keyboards that contour to the shape of the hand are much more comfortable.
After searching for while, I decided to build the Dactyl-Manuform 5X7:
Dactyl-Manuform
I'll save the gritty build log for another post and keep the build description somewhat short here. There are roughly four main parts of a keyboard build:
Fabricating the housing. I already had some experience with 3D printing so I decided to print my keyboard frames. Most builds that I've seen are 3D printed.
Assembling the switches (keys) & keycaps into the housing. Mechanical key switches can be found in abundance online and most keyboard frames are designed to accept a standardized fitting. I ended up using these key switches. They came highly recommended as a switch with a nice tactile feel that isn't too noisy.
Soldering. This is probably the most difficult part of the build because it's quite easy to get your wires crossed (sorry, not sorry). When building the keyboard, you're basically creating a grid of wires that each switch connects to. The switches have two prongs, one prong connects directly to a wire, while the other prong connects via a diode (think one-way valve for electricity). The grid is then connected to a microcontroller (tiny computer) that uses software to figure out which buttons are being pressed based on how electricity flows through the grid.
Flashing the firmware. In this step, you install the software onto the microcontroller. Most people use QMK for this step.
Printing the keyboard takes a while (over 24 hours). Any mistake in the print process can waste a lot of time and filament. When building my second model, I wanted to use a translucent filament. This filament ended up being far more brittle than what I was used to. When pulling the first completed frame of the print bed, I cracked the frame in half. That was one of many printing mistakes that I made.
Soldering is hard. I burnt my self a lot, I also melted the 3D printed housing in more than a few places. It’s really hard to get into some of the corners of the housing.
Sometimes the switches don’t fit quite right in the holes so you have to spend a lot of time filing the switch holes down to get the fit just right.
If you try to save money and buy cheap micro controllers like I did, sometimes the power input snaps right off of the controller when pressed slightly too hard.
Randomly over the course of a few months you might have a wire or soldering connection come loose in the middle of the work day. Instead of doing your day job, you'll find yourself debugging the wiring on your keyboard.
The wiring can be tricky to get right the first time. (The first time I soldered my keyboard, I soldered my diodes in parallel, not in series).
In the end, I am incredibly happy with this project. So happy that I actually built two keyboards, one for work and one for home. The project ended up ticking all of the boxes. I feel like I can program faster when I use the thumb clusters and It feels much more comfortable to use than a normal keyboard. Since I’ve been using it for well over a few months now, I would also say that it qualifies as a functional and useful 3D print.
Interestingly, there have been some positive social effects from having the keyboard on my desk. It serves as an interesting conversation piece and people love to check it out. I frequently open up a text editor so they can take it for a spin. I also get way more geek credit than I deserve, which helps when I’m BS’ing my way through some technical jargon on the job. People seem to think that because I built a keyboard, I somehow know what I’m talking about when it comes to whatever code I’m trying to hammer together.
I would definitely recommend this project to anyone who uses a keyboard!