Linda
By Linda
September 28, 20238 min read

Building your own custom keyboard: the possibilities of mechanical keyboards

HardwareSoftware Development

At 10KB we have a hardware budget that everyone may use themselves to decide which gear helps you enjoy your work more. As a non-developer I do not attach that much value to a mega workstation or 35 computer screens side by side (and two years ago I already got to buy a beautiful laptop). As a nerd though I do attach value to technical gadgets, and that is how a few months ago I discovered the 'mechanical keyboard', a world that goes far beyond tapping on plastic.

The hobby that came before this

A while ago at lunch we talked about different keyboard layouts. While the largest part of the world uses QWERTY, Raymond had taught himself Colemak: a keyboard layout where letters that are often used one after another actually sit next to each other. Since I am a touch-typing QWERTY user myself, I practised this new layout in my free hours. Conclusion: if you can already touch-type, switching takes a lot of extra work, but I still do not think I want to go back to QWERTY. The 'rolling' of my fingers over the keys (which Colemak is known for) feels a whole lot more pleasant. On top of that this first acquaintance also brought the realisation that I can simply adjust a layout to what I find pleasant, instead of how it 'should' be. Small spoiler: not much is left of the original Colemak layout.

A Lily58 keyboard

The keyboard itself

I always thought (just like 99% of humanity) that a keyboard is 'just' a keyboard. Inside 10KB I saw variants on that normal for the first time. Ted has a Moonlander and Robin a Lily58. Both so-called 'split keyboards' that consist of two parts. Ideal for placing both halves ergonomically in front of your shoulders, with room in the middle for coffee and snacks. That seemed like something for me.

So many options

How many keys do you actually want on your keyboard? What kind of key arrangement do you find important (ortho linear or the standard staggered one)? And then there is also something like a 'splayed' keyboard where keys sit rotated at different angles. Do you want Cherry MX red switches, Kailh choc browns, or do you go for a linear switch? RGB lights under your keys? Which colour keys do you want at all? All questions I had never heard of or thought about in my life. Weeks of research into the late hours followed. Luckily there is a subreddit for exactly the keyboard fanatics who find these questions relevant.

The whole idea of these mechanical keyboards is that you can decide everything yourself and that pretty much every function is programmable.

The physical layout

After printing out a number of different layouts (to see what fits my hands well), I fairly quickly discovered that my left and right hand look completely different. The index finger of my right hand is a lot smaller than that of my left hand, while the pinky is longer than her left sister. Now that I had landed in the biggest nerd corner of the internet in ages, I decided to push on: then I will also 'just' design my own circuit board.

Designing a PCB

With YouTube you get quite far and in a few days I learned the basics of KiCad (a drawing programme for making circuit boards). I took a number of existing keyboards for inspiration and then made exactly the adjustments that seemed ideal for my hands. It became a layout of 46 buttons (23 on each hand) and I only hope that is enough (because where do you put your numbers then?). It makes both halves nicely compact at least.

The final circuit board, ready for the factory

Soldering

I had never done that. Luckily the Pippi Longstocking in me thinks that helps for 'then being able to', and so my living room turned into a soldering station for two weeks. The tiniest LEDs, microcontrollers (nice!nano), switches (kailh choc brown), LED displays (nice!view), reset buttons, TRRS ports, and on/off switches were attached to both little boards as true monk's work.

Soldering

Honesty forces me to say that I have given up on the LEDs by now. After soldering them on again three times, attempts to replace them, and especially a lot of crying, I came to the conclusion that "not having LEDs is better for battery life". Then you know.

Forking, Cloning, Pushing and Flashing

The whole idea of these mechanical keyboards is that you can decide everything yourself and that pretty much every function is programmable. For that you have to program a bit and make sure the right software ends up on the microcontrollers. In an online tutorial I read this:

Fork this repo on GitHub, clone it locally, trigger a build by pushing a change, download the artifact and flash the UF2 files.

Random tutorial

These are the moments I am intensely grateful that I work at a software company. Flashing I still recognise, but I cannot imagine I mean the same thing by it as this tutorial. Luckily Rick immediately understood what this says (and even had to chuckle a bit), so a quarter of an hour later my keyboard was functional. Flashing apparently means something like 'putting a little file on it', so more than plugging a cable into the keyboard and dragging a document was not needed either.

Custom keymap

Since my Colemak discovery I looked forward most to designing and programming the keymap. These kinds of keyboards work with 'layers', which multiplies the possibilities by a thousand. You should see such a layer a bit like the SHIFT key for example: normally all letters are lowercase, but when you press shift they become capitals. Or for example the CTRL key that turns the 'c' into a 'copy key'. Besides layers you can give different combinations of keys a function, you can put whole pieces of text under a key (for example your email address), and it is possible to give keys double functions based on 'short press' or 'hold'. On GitHub there are countless examples of the clever tricks people have come up with. If 'a connoisseur' reads this who has a good tip for me, please send me an email!

Part of the keymap code

Done? And then?

This whole project consisted of a lot of waiting. Parts come from pretty much everywhere (though one of the best-known custom mechanical split keyboard shops (splitkb) turns out to be in the Netherlands) and therefore dripped in separately. When the keycaps finally arrived last, my new keyboard was finished. I am super happy with the end result, but cannot do that much with it yet 🙈. It is mainly getting used to the new locations of the keys. Over the past 20 years I have typed a certain way and muscle memory turns out to be a thing. I currently start my workday with the new keyboard, only to switch back to my 'old' keyboard after half an hour. I am curious how long this learning period lasts, though I typed this whole blog on the new keyboard which goes surprisingly well. A short test on Monkeytype tells me I am already typing at 56 words per minute again, so that is heading the right way.

Update after a week

Apparently that learning is not as much work as I thought beforehand. By now I type without problems on the new keyboard and I am largely used to the location of the keys. For the symbols I made a cheat sheet of the locations, but if locations do not feel logical they are easily adjusted. The missing number row I actually find much more pleasant than I had expected. I have now chosen a numpad under a layer and that also feels much more intuitive. Downside of so few keys: the arrow keys also have to sit under a layer, so for those you standardly have to press a combination of keys and I am not really used to that yet. As for the two halves of the keyboard I am a MEGA fan. By setting both my hands quite far apart, your chest opens and you automatically sit upright. The so-called 'shrimp posture' is thereby a thing of the past. I will still look at how I can minimise my mouse use; the fact that I still have to reach for it feels like a huge intrusion on my rhythm (ah, you can only have so many problems).

Ewout

Contact person: Ewout

Work together?

Have a software question or a project in mind? Get in touch with Ewout to discuss what you need and how we can help.

CONTACT

Get in touch with us

Have a question or want to discuss your software? Leave your details and we will get back to you soon.