The optimal programming keyboard

8 min read Original article ↗

Sabih Sarowar

My setup in all it’s glory:

Press enter or click to view image in full size

Intro:

My key layout is Colemak-DH, composed of 2 layers.

Press enter or click to view image in full size

The top layer in the pic is the default layer. Bottom layer turns on when the MO1 key on the far right is held down like shift.

I tracked my keyboard usage over a couple days. 15% was programming. I then compared key location frequency of Qwerty vs. Colemak-DH:

Press enter or click to view image in full size

Here is my speed growth switching switching to Colemak-DH. over 5 months. I started in summer 2021 after 2nd year uni. Things were light. Here is Aug 1 to Jan 1, tracked with typing tests from monkeytype.com:

Press enter or click to view image in full size

The keyboard is the Iris rev6 aka revision 6, from keeb.io. It has Kailh speed silver linear switches which are lighter than most switches. They need just 40g to activate at 1.1mm of travel. Usual travel for switches is 2mm at 60g+.

It’s tented up on the front using cheap home depot screws. It has Loc-Dots touch bumps on the index finger keys. The key layout is Colemak-DH but with one modificatin I made. The S and R keys retain their Qwerty position. In Colemak-DH they are switched. This messed me up a lot.

The mouse is the Logitech M575 (white), a trackball mouse. I wanted black at first but it was out of stock everywhere and I had to get the white. Great choice in hindsight as it matches my keyboard. The mouse stays in place, all that moves is that blue ball.

If you have eyes, you will notice the keyboard is split in 2. This is the biggest benefit. My wrists and shoulders are therefore in a neutral position. As if my arms are stretched out forward. This never damage under my wrist in the carpal tunnel. Here’s a study showing that 13% of computer professionals suffer from Carpal Tunnel Syndrome.

My keyboard has 60% number of the normal number of keys. This ensures I never displace my hands when typing; all keys are within handspan. On a normal full size keyboard, to reach the numpad you have to displace your right hand. But on mines, holding down the layer switch key activates a new layer under my hands. The numpad activates under my right hand.

Notice that the keys are parallel vertically but the rows are curved. The horizontal curve matches how your fingers naturally lay on a surface. Bend your fingers and notice how the pinky curves towards you. Mimicking your hand structure allows you to minimize finger movement.

More about key layout and shortcuts

Press enter or click to view image in full size

Notice the arrow keys are all under my left thumb. Compare this to a normal keyboard. I navigate with ease.

Notice backspace is under my right thumb. You know how far your pinky has to reach normally for it? On a normal keyboard switching the position of the backspace key to the caps lock key is a huge improvement. Mines takes that further by co-locating the backspace and space key under my right thumb.

Notice how control is left of my left pinky. Control is something you always use when programming and using keyboard shortcuts. Putting it where it is is a game changer.

Notice shift is under my right thumb. This reduces stress on my left pinky and works out well. Had trouble finding a spot for it actually and this was the best place.

Another big plus is that the home and end key are adjacent to your right hand. No need to displace your hand for them like on a normal keyboard. I can easily highlight whole lines with ease. Efficient programmers will love this. In 3rd year I once saw 3 different CS classmates highlight lines with their mouse instead of their keyboard. I cringed.

In the second layer, the numpad is under my right hand. All the programming symbols are under my left hand. The most used symbols are easiest to access.

I use Powertoys Run on Windows, a collection of tools to speed you up. I use it’s keyboard manager tool to remap many shortcuts, some globally and some just for Chrome. Alt+tab for example got remapped to ctrl+b which is easier as you will see below.

I use my left pinky to hit control and my left index finger to hit all nearby keys to do super common tasks like new tab, close tab, next/previous tab, and switch windows.

Tab and window navigation is as easy as breathing. The default way of using shift + tab and alt + tab is a torture for your left pinky. It is now instead:

  • Switch window: ctrl + B
  • Next tab: ctrl + G
  • Previous tab: ctrl + T
  • New tab: ctrl + P
  • Delete current tab: ctrl + D

Look at my layout once again and see how my left pinky and left index does all of these. P, B, T, G, D, all in adjacent range of my left index finger:

Press enter or click to view image in full size

I use a Chrome extension called Vimium that creates shortcuts that are just 1 key long. All them are under my left hand.

  • To scroll the page up/down, I use R and T, right under my index and middle finger.
  • W refreshes page, V duplicates tab.

There is this one other extension called Web Search Navigator that allows me to traverse through google search search results using up/down, right/left to move between search pages and enter to open a result. A game changer for google navigation. I am thinking of switching to kagi search which has better keyboard shortcuts and better search results.

Thoughts about Qwerty vs. Colemak-DH

If you’re a programmer, getting this keyboard and layout is a big boost for comfort and speed (especially when it comes to symbols). Switching to Colemak-DH might be hard, but it took me just 2 months to get to 65 wpm. I’m at 120 wpm a year later. I maxed out at 125 for Qwerty.

But you don’t need to switch to Colemak-DH. Most of the benefits is a split keyboard and the shortcuts I use. If you have some weeks of downtime to stomach the temporary speed loss, it’ll definitely pay off in the long term (the rest of your life).

In depth comparison of different layouts: http://mkweb.bcgsc.ca/carpalx/?keyboard_layouts. Take note of the bold number on the right side, under the effort column.

How to buy and build; skip if not interested:

If you want to buy it, you can get most of it but not all prebuilt from keeb.io. Here are the addons I recommend:

  • Rev. 7: it has hotswap sockets which mean you can change switches by popping them in as they use friction, no soldering needed.
  • Switches: Milky Gatereon Yellows (linear).
  • I don’t recommend tactile switches because the tactile bump isn’t really useful in my experience. You know that if you press, it will activate. Light linears are nice because they are smooth all the way down. It feels so fast and smooth. I have the Kailh speed silvers which I bought separately. If you want them you can get them from flashquark.com or kbdfans.com. Preferably the latter as you will probably want other things from them as well. Compared to the Gatereons, the Kailhs are a bit lighter at 50g vs. 40g and half the distance at 1.1mm vs. 2mm. If you get the Kailhs, you want to pay someone to pop them into the hotswap sockets even if they do just pop in. There’s a certain technique so that popping in one switch doesn’t pop out another. This took me 2 hours which wasn’t worth the hassle.
  • Frosted or white acrylic plates
  • Frosted/w tenting holes
  • Two 1u keys for both left and right thumb. More keys the better and the thumb keys are super useful.
  • 1.5m white cable to connect the 2 halves. 30cm is too short.

These things don’t come in the prebuilt service so you need to buy them separately:

Now for the key layout:

  • You will need to first make a key layout, compile it to a hex file, then use QMK Toolbox to flash the layout to your keyboard’s microcontroller.
  • You can make the key layout with qmkconfigurator.com. Or download mines: https://mega.nz/file/3LxUjDTI#DAJvUFh0ebqOhJRV18Vy1DtPivb99rZt09kyOCJAVYQ.
  • If you want advanced key functionality like holding the home key for .25 sec selects the entire row, you would create a C file representing the layout compile it. Edit mar 2024: I’m actually gonna learn vim instead soon, it’s faster :D

And voilà! You will never want to go back to the unoptimized, uncomfortable ways of the past.