Making my own keyboard layout. What I learned

Ben Lu
7 min readSep 4, 2020

I love to tweak and tune my life, optimise my experiences, and make things work for me. But I’m also extremely practical, so I don’t have the strong urge to change all my lights to smart lights, or develop my own code editor from scratch. The tradeoff matters.

I’ve thought of changing my keyboard layout for a long time, but it’s always been a task that’s been a bit too costly in the tradeoff department. An expected badish case, would be that I end up right where I started in terms of typing speed and comfort, but at a huge cost, plus, I would not be able to use other people’s keyboards. A couple thoughts changed here though, the need to share keyboards was reduced due to covid-19, I learnt the cost of relearning keyboard shortcuts is relatively low because they come naturally when you think of the key, and the ergonomic gains became more apparent to me. So I asked around and started diving in.

Keyboard Layouts

Qwerty

So Qwerty is probably “good enough” for most people. It’s also a standard worldwide, meaning jumping on someone else’s computer to troubleshoot something or just to check some websites is really easy. Which means switching has a huge opportunity cost. There’s also some misinformation about Qwerty being inspired by jamming typewriters that’s out there that needs more scrutiny.

Qwerty Layout

Dvorak

Dvorak is famous for being the competitor to Qwerty. Notably for my purposes, it makes changes to the symbol keys as well as the letters, which is even more of a change. It is widely available on most operating systems.

Dvorak Layout

Colemak

Colemak is a more optimised keyboard, trying to optimise the key layout, while maintaining the symbol positions. This was hugely appealing to me, I didn’t believe moving symbols around meaningfully affected typing performance, plus I had the hope that in the event I do have to use someone else’s keyboard, it wouldn’t be completely foreign to me. It is widely available on most operating systems.

Colemak Layout

Workman

Workman is a wonderful treatise to this discussion and outlines their thinking to developing their keyboard layout at https://workmanlayout.org/. It is not available on most operating systems.

Workman Layout

And more

There are many more out there, but past workman they become much less popular and have similar tradeoffs. The range of possibilities is widely known given the arrangement of keys.

Tradeoffs

So the choice at this point in time is which to learn. Philosophically, I wanted to stay as close to qwerty as possible, with as few key moves in general, I wanted to maintain comfortable keyboard shortcut usage, especially in vim. Perhaps I believe that I can learn both Qwerty and a new layout, and there’s a reverse belief that the more different the keyboard layout the easier it is to pick up and maintain that cognitive separation.

After all this internal fighting, I eventually tried Colemak for a while, hated the general slow nature of learning a new keyboard, which is learning the layout, then learning the patterns for the words by repeating each over and over. Anyways when I got reasonably okay at it (30wpm+) I tried using vim and I hit a snag. Vim’s movement keys are hjkl, which are all activated by the right index finger on Colemak (it’s not too bad on Dvorak). I tried to remap the movement keys, which is a huge mental change in key layout depending on what moves where, and even worse is that many sites use vim movement keys to move around (such as YouTube). It’s much harder to remap the world to my liking.

And so now I had two choices, go Dvorak, which has decent hjkl mappings, or go custom. Given that I wasn’t fond of the radical change that is Dvorak, I started working on my own custom keyboard, I ran various pieces of text through http://patorjk.com/keyboard-layout-analyzer/ to try not to beat the existing layouts, but to be about the same, while moving as few keys as reasonable, and keeping hjkl in a reasonable position.

Key exposed metrics

Following the workman treatise, Patrick Gillespie’s keyboard analyser http://patorjk.com/keyboard-layout-analyzer/ is wonderful and plugging in a few books from Project Gutenberg really highlighted a few things for me. Most important is that all metrics are isolated to that book, switching books will give different relative metrics.

  1. Heatmap: this is your first stop, you basically want to put the most common characters you use on the home row. Don’t worry if some are close, those don’t matter that much. The letter “e” dominates here.
  2. Consecutive finger use: using the same finger on a different row is hugely annoying, avoid this as much as possible.
  3. Total distance: in addition to the heatmap this outlines the relative cost for different layouts.
  4. Consecutive hand usage: this pretty much outlines the fatigue you will feel in each hand

A note on my initial solution

My initial solution I used for a few months, but because I’d swapped “l” and “o” but otherwise kept the same, I found that I was hitting the pair a lot with the same finger which was bothering me. I also had an extremely tired right pinky because it had both the “i” on the home row and “p” above because I felt at the time that it could be better utilised, but then regret. Some of the discussion merges my experience with the initial and current solution.

My current solution

My “ayro” keyboard

Using Ukelele’s swap key function, I created this layout for myself. My current solution has 11 keys in different places, which is significantly less than the 21 for Workman, 31 for Dvorak and 17 for Colemak. This means for me to go from nothing to 30 wpm, took about a week, compared to a month for Colemak, though some of this might just be because I’ve put myself in the mindset.

Key notes on design choices are that, my left hand is relatively unchanged, notably the “t” got moved to the home row replacing “f” which is not that common, the “r” got moved to the middle finger’s top row (as it is similarly common as the other home rows, but not so much so as to offset them). “j” and “k” got dumped in the bottom right, which is okay, though this moved the “m” up randomly in to the middle left. “e” is extremely important and is on the home row on the right copying Workman and Colemak here. Having a brief go at keeping the “e” on the left, it was difficult to find a good setup that didn’t radically change the layout. I also copied Colemak and Workman with the placement of “;” with the pinky position to reduce pinky load, and kept the “l” where it is to reduce consecutive key presses with the ring finger.

In the end, there’s a slight increase in load on the index finger, having to hit the awkward “y” and “u” characters especially, but given all the tradeoffs, this is what I’ve settled on for the time being.

Conclusion

Okay that’s a lot of discussion but on to the key tradeoffs:

  1. Does it feel nicer? YES. I recommend on this alone, home row typing is so nice
  2. Can I use a Qwerty keyboard? Nope. The plan is to try relearn it some day, and be able to do both, but right now I’m hunting and pecking
  3. How has my typing speed changed? Right now, even after several months, I still make lots of mistakes and average around 60–70 wpm, compared to my 75–85 wpm I used to achieve
  4. Can I use vim and other shortcuts easily? Yes! Perhaps slightly weird and awkward at times, it still mostly feels the same

Given the lack of benefit I’ve seen in the short to medium term, I’ve been thinking, should I switch back to Qwerty or keep on going, and just the feel of mostly typing on the home row has really attracted me. It just feels that much nicer. In the mean time I’m doing more typing training to at least get back to where I was.

--

--