Keyboard Builders' Digest / Advent Calendar
Logical Keyboard Layout Design
Apsu shares her experience going from curious about alternate keyboard layouts to accidentally being a prolific layout designer.
Published December 22, 2022
Hi, I'm Apsu, one of the many denizens of the nerdier side of the net. By day, I am a Principal Software Engineer for Autodesk. By night I have spent time into everything from designing and building my own 3D printers, becoming a top player in several PvP shooters, and more recently churning out keyboard layouts.
It's been a wild ride, that's for sure. I started out like many people do, just looking for something a bit more ergonomic. I started programming when I was 9, over 30 years ago now, and I have been using computers as a hobby as well as for my career ever since.
I had heard of Dvorak and Colemak in years past, but other than a brief stint with Dvorak, I never really spent much time learning them. After all, the big selling point in those days was speed and efficiency. But my Qwerty speed was 170+, and I was young and invincible.
That all changed a few years ago when my hands started getting tired sooner, and eventually hurting, without a particularly strenuous day of typing. Everything checked out, I was fine healthwise, which meant it was the dreaded RSI. The orthopedic surgeon told me "either figure out something less irritating for your hands or you may not be able to type anymore."
And with that... I was on my way.
Searching around coughed up the usual suspects: Dvorak, Colemak, and this new one Workman. I read the website blurbs, watched a bunch of videos, and ended up trying Workman for a bit. It was alright, but like usual, I wanted to know more. I wanted to understand how these layouts were built, and why.
I found my way to the Colemak discord, where I met some other folks who had made modifications to the layout, and we discussed Workman's pros and cons, and that eventually led me to the AKL discord – a dedicated place to discuss and build Alternate Keyboard Layouts.
I very quickly tumbled down this rabbit hole as I discovered – then contributed to – tools for analyzing and generating layouts, tweaking and adjusting pieces, twisting them in new lights. I couldn't get enough, and was able to learn a lot about what makes a layout tick, and helpful ways to think about optimization.
First, it would be helpful to define some terminology:
- SFB – Same Finger Bigram: two keys pressed with the same finger sequentially
- DFB – Disjoint (Same) Finger Bigram: two keys pressed with the same finger with 1 or more other keys in between
- LSB – Lateral Stretch Bigram: two keys pressed sequentially with different fingers but where one or both has to stretch off its home column position
There are many more concepts such as Rolls and Onehands and Alternates and Scissors and so on, but for the moment the major bigram types are the most important starting points.
Another basic concept that's important to grasp is how fingers are generally assigned to keys. We can think of this like a grid, and using a handy tool I can identify which keys each finger owns by color, like so:
This separates keys into rows and columns; generally, each finger is responsible for one column, which contains three rows, except the index which is responsible for two columns.
Thinking About Optimization
Firstly and most important of all, the SFB. This is the worst sequence, as it is both the slowest and also most stressful typing motion to make, where the same finger has to press, release, move, and press again. Only slightly better is when it's the exact same key being pressed twice, since repositioning the finger isn't required.
Next I like to think about finger usage, which is the sum of all the letter frequencies a given finger is responsible for. Given that the speed, strength, and often independence of some fingers is less than others (pinky and ring being particularly outliers), having a very high-use column on the pinky would be a bad optimization, for example. Putting higher use letters on the inner fingers will also tend to increase the rate of rolls.
A companion to finger usage are what I call finger patterns. The gist here is that certain combinations of finger positions are much more uncomfortable than others, even when SFBs and usage are solved for. A good example would be Qwerty
UKO; the former has the index/ring on home row, and middle on top row, while the latter inverts them. The former is much more comfortable because the middle finger is the longest finger for most people. These same kinds of patterns can be found in all finger and row combinations.
Lastly, in most of the layouts I've created, I have also tried to minimize LSBs. The most common LSBs are reaching into the 'middle' columns with the index fingers;
YHN on Qwerty. You can do this in a variety of ways, but the low hanging fruit is to simply put as many low-frequency letters on those keys as you can to start. Punctuation can also be a good choice in some cases. Many people (myself included) find that this helps reduce strain in the hands in much the same way as using an ergonomic keyboard does, by reducing awkward motions or distances a bit more.
Rolling vs Alternation
This is a very old debate at this point, as to whether emphasizing Rolls vs Alternation is "better" in some facet or another. All we can say for sure is that Rolls definitely feel easy for learning a new layout and gaining speed on it quickly, as well as anecdotes of some of the fastest typists setting their speed records using high-Roll layouts (such as Colemak). So if you wish to optimize a layout with Rolls in mind, you will want to pay special attention to certain specific consonant locations, as well as most likely cluster all the vowels together on one hand.
More details can be found here in a document the AKL community has put together, but the gist of the idea is that some consonants appear in bigrams almost always preceding a vowel (such as
H), and others are almost always preceded by a vowel (such as
N). This is why a lot of layouts have most of the vowels on one side and also put
N there to enhance the rolls; putting it on the index home spot helps ensure all of those rolls will be from the outer fingers to the index finger, which is considered to be the most comfortable roll direction to do without practice – same idea as drumming your fingers on a table (try slowing down the drumming and you'll see we naturally do it pinky-ring-middle-index).
Regardless of what tools you use for generation or analysis, and which metrics you choose to represent as most helpful, the number one most important tip I can give you to layout design is to try what you make. There's quite a few designers who don't put in much time on the layouts they create, and as a result a bunch of ugly warts can lurk in their creations until some unsuspecting person tries to learn it someday. Usually these end up being SFBs that weren't spotted, or finger patterns that just feel super awkward, or LSBs that strain over time, that sort of thing.
You shouldn't be afraid to mess around and try things out; you won't forget the layout(s) you already know, but it may be a little awkward for a day or two while you are memorizing the new letter positions and finger patterns, but if you spent a few minutes of focused practice on your existing layout it would come right back to you, so try something new and interesting you come up with and see how it works.
Published on Thu 22nd Dec 2022. Featured in KBD #108.
Did you like reading this post?