One Man’s Quest to Build the Ultimate Custom USB Keyboard

As every keyboard nerd knows, your keyboard choice is a deeply personal decision. Sure, we can all agree that a clicky mechanical keyboard…

Cameron Coward
5 years ago

As every keyboard nerd knows, your keyboard choice is a deeply personal decision. Sure, we can all agree that a clicky mechanical keyboard is a must, but there is a lot of debate over what constitutes the perfect layout and switch feel. Some people can find the right commercial keyboard for them, but Blake Smith decided the best solution was to build a completely custom USB keyboard.

USB keyboards are so commonplace that you might assume building one is easy. But, it’s actually a substantial undertaking, and requires skill in three major areas: CAD modeling for the physical layout, PCB design, and programming so the keyboard can talk to your computer. For his custom keyboard, Smith accomplished all three on his own.

He started with the physical design of the keyboard, which has a layout similar to OLKB’s Planck and Preonic keyboards. The layout is ortho-linear, which is much more compact than a conventional keyboard design. Smith modeled his keyboard in OpenSCAD, and used the dimensions for Cherry MX Brown key switches. After the design was done, Smith’s brother-in-law laser-cut the keyboard plate.

Next, Smith had to tackle the programming. He decided to use an STM32 as the microcontroller, and started with a Nucleo development board to prototype the circuit. He tested his code with four keys on a breadboard, which allowed him to work through the significant hurdle of programming a USB HID device. As Smith points out, that’s not an intuitive process, but he was eventually able to get it working by spoofing an existing keyboard device ID.

Finally, he had to create the schematic and design the PCB. That was all done within KiCAD, and utilizes a standard keyscan matrix circuit. Instead of continuing with the Nucleo development board, the PCB uses a surface-mount STM32 microcontroller directly. With the PCB ready, Smith sent the Gerber files off to JLCPCB for fabrication.

A little over a week later, the PCB arrived and Smith was able to start assembly. The larger components, like the key switches, were through-hole and soldered with an iron. Smaller components, like the STM32, were surface-mount and soldered with hot air. The finished keyboard looks great, and Smith reports that it works well.

Cameron Coward
Writer for Hackster News. Proud husband and dog dad. Maker and serial hobbyist. Check out my YouTube channel: Serial Hobbyism
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles