Building my first keyboard (and you can too)

starting with knowing absolutely nothing about building keyboards

This keyboard building guide and saga started off with me simply wanting an adorable keyboard…

The body

First, you’ll need to decide what kind of body you want your keyboard to have. There are lots of options ranging anywhere from a typical flat keyboard to a split ergonomic one and everything in between.

right hand of dactyl body with switches inserted

The switches

Switches are possibly the most important part of your keyboard. They are the mechanism underneath your actual keys that moves down when you press a key.

The keycaps

Most keycaps won’t have much of an effect on how you type, but they can give your keyboard a different look and feel. You can customize colors, fonts, or even have blank keys.

cotton candy colors

The microcontroller(s)

You will need one or possibly two microcontrollers so your keyboard knows what to do. Which microcontrollers you choose can impact which firmware you use and how things get wired.

The wiring

I decided to handwire my keyboard. The other option is to have a PCB (printable circuit board) printed.


If you are handwiring your keyboard, you’ll likely need the following things:

  • solder — if you’re handwiring, you’ll need to solder different parts of your keyboard together. Soldering uses a soldering iron to heat metal and create a little metal “joints” that helps hold things in place and is also conductive. Lead based solder works best as its melting point is much lower than non-lead based alternatives. For beginners (like me!), it’s easier to use lead based solder, but be sure to work in a well ventilated area when soldering.
  • soldering iron —the tool that will actually heat the solder. I’m not a soldering expert, but the general idea is to heat the metal you want the solder to melt onto, not the solder itself.
  • electrical tape — it’s important that certain parts of your keyboard don’t touch each other, and the easiest way to insulate those parts is probably with electrical tape.
  • diodes —diodes are like a one way street for electricity by only letting the current flow in but not out. They help your microcontroller know which key you’ve pressed. You’ll need as many diodes as you have keys.
  • TRRS cable — TRRS (or tip ring ring sleeve) is commonly known as an audio cable and will be used to transfer information between the two hands of your keyboard.
  • TRRS mount — This is what your TRRS cable will be plugged into. You’ll need two of these (one to connect to each microcontroller on each hand).
  • Micro USB-to-USB cable — This is what will connect your keyboard to your computer. For fun, you can actually build your own cable. I did this and it was a bit nerve wracking, but in the end I had an adorable pink cable I built myself so 🤷‍.
  • multimeterthis will help test connections for your keys.


First, you’ll need to shove all of your switches into all of the holes in the top part of your keyboard. The part that you can push down will go on the top of your keyboard (that’s where the keycap will go). There should be a little slit in each switch. This slit should be oriented to be at the top.

all together now


Now comes the wiring. There aren’t a lot of guides or information out there for wiring, so I made a few diagrams to make things easier.

stripped wire used for columns
left: switch diagram of pins, right: Pro Micro pin layout
row wiring diagram
left: a diode with a loop for easy soldering, middle: diodes arranged on the silver pin for wiring rows, right: diodes soldered to silver pins and looped around wire in prep for soldering
continuity and diode symbols is the mode for testing connections
testing connections after wiring to the Pro Micro
column wiring diagram
left: fully wired rows and (almost) fully wired columns right: closeup of freshly wired columns
left: Pro Micro pin labels, middle: Pro Micro prepped for soldering, right: row wires running to Pro Micro with electrical tape insulation
left: wiring diagram for TRRS pins to Pro Micro pins, right: TRRS mount with wires prepped for soldering


Now that everything is wired, it’s time to make the keys do something.

brew tap osx-cross/avr
brew tap PX4/homebrew-px4
brew install libusb
brew link --force avr-gcc@7
brew install dfu-programmer
brew install gcc-arm-none-eabi
brew install avrdude
main layer
sub layer accessed by tapping the TOGGLE LAYER key
it’s alliivveee


All that’s left now put on all of your keycaps. Gently but firmly push the keycaps onto the top part of each switch. And don’t forget to screw on the back of your keyboard!



Building anything takes a lot of time, trial, and error. Things don’t go perfectly the first time. I broke many a wire when trying to strip the coating off, glued switches the wrong way, and I even snapped off the micro-USB end of a Pro Micro when plugging in a cable AFTER MY KEYBOARD WAS TOTALLY FINISHED. I had to order a new Pro Micro, which I found out was defective after I re-soldered it, so I had to order YET ANOTHER ONE and re-solder that.

software engineer @twitter, previously @medium. doing scala + graphql. pokemon gym leader. potato compatible. @sachee