← More about keyboards

Overview

This post is about switching from QWERTY to an alternative keyboard layout. Why and how do people switch? Which alt layout is best—Dvorak, Colemak, …?

Which alt keyboard layout should I learn?

There is no consensus on what is the “best” layout. No layout is perfect. Layout design is a balancing act of many competing objectives, and the right balance is subjective.

I highly recommend reading the Keyboard layouts doc. This is a valuable resource for anyone interested in alt keyboard layouts. It explains concepts and terminology for how to compare keyboard layouts, suggestions on how to choose a layout, and practical tips on how to learn a new layout. You might also find useful the older version 1 of the doc.

Here are metrics for a sampling of some better known layouts. Lower is better for same-finger bigrams (SFBs), LSBs, redirects, and off-home pinky use; higher is better for rolls. Metrics for English were computed by Oxey’s layout playground.

Layout SFBs LSBs Rolls Redirects Pinky off
QWERTY (1873) 6.615% 6.882% 37.243% 13.187% 2.36%
Dvorak (1936) 2.779% 1.255% 38.924% 3.458% 4.80%
Arensito (2001) 1.545% 1.945% 49.514% 12.385% 1.21%
Colemak (2006) 1.387% 3.495% 46.113% 10.579% 0.38%
Workman (2010) 3.000% 1.727% 43.636% 10.414% 0.38%
MTGAP (2010) 1.299% 0.711% 43.718% 4.915% 4.04%
Colemak-DH (2014) 1.387% 1.975% 46.113% 10.579% 0.38%
Halmak (2016) 2.988% 1.151% 37.956% 4.140% 6.02%
Hands Down (2020) 1.082% 3.487% 44.137% 4.165% 1.50%
BEAKL 19 (2020) 1.831% 2.843% 42.239% 3.378% 2.29%
Engram (2021) 1.504% 0.625% 42.180% 4.515% 6.67%
Semimak-JQ (2021) 0.872% 2.410% 42.705% 6.616% 4.33%
APTv3 (2021) 1.199% 0.498% 46.864% 6.224% 4.16%
Nerps (2022) 1.280% 1.955% 44.709% 2.942% 1.52%
Canary (2022) 0.962% 2.675% 48.537% 7.152% 3.50%
Sturdy (2022) 0.935% 2.413% 48.082% 5.399% 2.36%
Gallium (2023) 0.956% 1.456% 44.566% 3.157% 3.73%
Graphite (2023) 1.043% 1.358% 43.702% 2.959% 1.84%
Recurva (2023) 0.829% 1.844% 48.176% 5.549% 5.17%
Focal (2024) 0.801% 1.516% 45.680% 4.519% 2.36%

See also this page for an expanded version of this table.

Colemak-DH is quite popular in the custom keyboard community. It is a solid, well-tested option. If you don’t know what to pick, go with Colemak-DH.

SteveP’s Colemak-DH layout.

Some recent favorites on r/KeyboardLayouts are APTv3, Canary, Sturdy, and Graphite. Each of these layouts came from distinct design priorities, which is interesting to see reflected in the metrics in the table above.

Magic Sturdy. If you are daring to consider something more experimental, I use Ikcelaks’ Magic Sturdy, a variation of Sturdy. The “magic” is a key whose function depends on the last pressed key, implemented using the Alternate Repeat Key. This key is used to remove the top SFBs and type common n-grams. It’s a magical typing experience!

Ikcelaks’ Magic Sturdy layout plus a few tweaks of my own.

A = O
C = Y
D = Y
E = U
G = Y

I = ON
L = K
M = ENT
N = ION
O = A

P = Y
Q = UEN
R = L
S = K
T = MENT

U = E
Y = P
= THE
. = ./
# = INCLUDE

More magic: Magic Romak, Nordrassil, and Vylet are a few other layouts designed with an integrated magic key.

Why do people want to use alt layouts?

The main motivation for alt layouts is better typing comfort. Alternatives to QWERTY dramatically reduce awkward typing motions such as same-finger bigrams (SFBs), reduce how much your fingers need to move (finger travel) to accomplish the same typing, and balance the typing workload over the fingers more evenly.

QWERTY was designed by Christopher Sholes in the early 1870s for the Sholes and Glidden mechanical typewriter. It’s often said QWERTY was designed to avoid the typebars from jamming, though it’s debatable whether that’s historically accurate.

1930s Remington portable typewriter with QWERTY layout. Photo by Mariochs, distributed under a CC BY-SA 4.0 International license.

What is obvious though is that QWERTY has a lot of SFBs, like ed, un, rt, ol, much more than any popular alt layout. Think about typing “loft” or “unjust.” Those same-finger movements are slow and awkward to type.

To be fair, QWERTY was basically the first successful layout, a pioneering solution to a tough problem. It shouldn’t be surprising that its metrics are far from optimal. At the time it was created, the activity of typing itself was new.

Should I use an alt layout?

It’s your choice. You don’t have to learn an alt layout.

Switching to an alt layout takes a lot of effort (at least a couple months of daily practice), and the benefits are not huge. I don’t mean to be discouraging, just raising some counterpoints:

So why do it? For me, switching to an alt layout is a long-term investment in my health and comfort. I will type a lot in my life (I work as a software engineer), so spending several months learning a new layout is a fair price.

Outside the box

Most layouts are designed so that it could work with two-handed typing on a standard keyboard. But some layouts go outside the box. Arguably, these differ enough from standard typing that they are not just “layouts” but distinct input systems.

Layouts with thumb keys: Some layouts designed for split ergo keyboards use a thumb key (or sometimes multiple thumb keys) to type letters. The first such layout was the Maltron layout (1977), placing E on the left thumb. Some more recent examples are the RSTHD layout, Nordrassil, and Hands Down Promethium.

xsznix’s RSTHD layout.

Many other thumb key layouts are catalogued and discussed in Precondition’s post Pressing E with the thumb. The advantages are gaining a free home row key and removing conflicts with bigrams involving E. A downside is that such layouts are not usable (without creativity) on conventional keyboards. Another potential concern is the extra load on the thumbs—PSA: Thumbs can get overuse injuries.

One-handed layouts: Ardux is a one-handed keyboard system for use on 8 to 36 keys. All keys from a full keyboard are available through chording and layers. Many other one-handed typing systems have been developed. A well-known older one is Doug Engelbart’s five-key keyset (~1965).

How long does it take to learn an alt layout?

Realistically, expect it to take at least a couple months of daily typing practice. Switching to a new layout is a large undertaking.

I have switched layouts a half dozen times. My progression tends to be 40 wpm after the first month, 50 wpm after the second month, and 80 wpm after the first year. Other people have reported similar order-of-months experience to learn a new layout. Your mileage may vary. Rate of progress depends on how similar the new layout is to your familiar layout (more similar implying quicker to learn), how consistently and how much you practice, and how much sleep you get (yes, seriously).

It’s worth it for the comfort, but be patient and approach it as a long project. Developing muscle memory takes time and consistent practice.

How to learn an alt layout?

It doesn’t have to be cold turkey. The first couple weeks are the hardest since your typing will be frustratingly slow. Some people believe in switching to using the new layout alone “cold turkey” as the best way to learn. You can do that, but this isn’t necessary. In the first couple weeks, I’ve found decent progress doing 30 minutes of practice a day on the new layout, then switching back to my familiar layout for the rest of the day. Then once getting to a usable 30 wpm or so, switching the new layout full time is more bearable.

Obligatory warnings

⚠ Ensure that you can type your computer password in the new layout. Otherwise you might get locked out!

⚠ It is essential that you use the layout’s intended finger placement, that each key is typed with the intended finger. Failing to do this effectively changes the layout’s SFBs, likely dramatically for the worse and ruining the layout. Consider learning a new layout as an opportunity to brush up on touch typing (Should I learn how to touch type?).

Pay attention whether the layout is described for “angle mod” finger placement. By default, standard fingering is assumed as in the top figure. An angle-modded layout follows the middle or bottom figure:

Colemak-DH with standard vs. two variations of angle modded fingering. Note displacement of the lower row.

⚠ Be careful about rearranging keys in a layout for the same reason as the previous point. Rearranging keys is likely to ruin the layout unless you know what you are doing. If you do want to rearrange keys, use an analyzer tool like Oxey’s layout playground to check how metrics are affected and read the Keyboard layouts doc to learn the fundamentals of layout design.

A suggested training approach

With the warnings out of the way, here is a suggested approach to learning a layout.

(~5 minutes) First, memorize the position of each letter in the layout. Get a paper and pen and draw the layout. Draw it again and again, repeating until you have every letter memorized. Once successful, hopefully, you are able to close your eyes and visualize the layout in your mind, a significant first step in acquiring a layout. You can also save one of your layout drawings as a cheat sheet for later reference, though hopefully after this exercise you’ll rarely need it.

(2–3 days) Next, begin training your fingers on keybr.com. The keybr.com typing practice site is excellent for this early stage of learning. It uses an approach of starting with a handful of common letters and exercises of typing words with those letters. Once you reach a required proficiency on those letters, more letters are introduced, one at a time. Practice on keybr every day for at least 30 minutes. Eventually, you learn all the letters, and by that point should be able to type in the new layout at 20 wpm, if not more. You are then ready to graduate to other practice methods.

There are many good typing practice sites. General advice is to strive for 99% accuracy, try not to sacrifice accuracy for speed, and try to continue practicing daily. Consistent practice with focus on accuracy will naturally improve your speed over time.

See what you like from the following practice sites:

What about Vim?

If you use an editor with Vim key bindings, pay attention to the positions of j, k, w, and b. Alt layouts optimized for English tend to put j and k somewhere awkward, like a corner pinky key, being rare English letters (ranks 24 and 22 in Norvig’s data). This is sensible for general typing, but problematic for Vim, where j and k are used for vertical navigation. Depending on how you navigate, w and b may be similarly troubled, with their frequencies in English being relatively low (ranks 18 and 20).

To make the point, here is a real keylog snippet of me editing C code in Vim. About half of my keystrokes are commands, not written text:

{ } ko2 c2 ko V(yes_token); yes_token = INV n; jdd wjj>> wkkwkcwYES_START
jjjjddkkpjyykkpjo}  k<< wjk} return false; case YES_STOP kjddkkkkp<<..o
jjjJJuww && j<<jdd wjkkA: k<<jdj<<kyyjpwwwwwwwwxjdj<<j<<jddjcwreturn
false  wjjjdjkkkdjkko Alternatively, you can do this without the
Deferred Execution API as follows.kkkVkyjpkddostatic uint32_t next_yes;
kk = 0; ko kwwbistruct { } yes = {0, false}; kko  uint32_t next_time; kjbbc

In principle, a Vim user should make less jk-spam through better use of other navigation than I do, like find and til f t, paragraph motions { }, relative line jumps, window-relative home / middle / last motions H M L, and so on (:h motions.txt).

It is possible to edit your .vimrc key bindings to navigate using other keys. I wouldn’t recommend this, though. Vim has so many commands that changing one key binding is likely to overwrite another, so there is potentially a domino effect of displaced bindings. Another limitation is there are many other programs besides Vim that use Vim key bindings (e.g. less, cmus, GMail), but not all are easy or possible to configure.

How, then, can one use an alt layout with Vim?

What about keycap legends?

You would think that to avoid confusion, changing to an alternative layout means you also need to rearrange or relabel your keycaps to agree with the layout. Fortunately, this turns out to be a non-issue in practice. Surely, you plan to touch type on the new layout? You should! With proper touch typing, you will never look at the keys, and keycap legends don’t matter.

If you really must have it, look into “relegendable keycaps.”

Is it really that hard to arrange 30 keys?

You might wonder why there are so many layouts and why this is not a solved problem.

A good layout does not result from optimizing one metric in isolation. The first obvious idea of putting the most frequent letters in the best positions minimizes only a positional cost and has low quality results. A good layout comes through ensuring that multiple metrics are simultaneously reasonable—typically including at least a positional cost, SFBs, scissors, redirects, and rolls.

Layouts are often created using a layout optimizer such as oxeylyzer or genkey, software that searches for a layout by optimizing an objective function of such metrics.

Alternatively or in combination with optimizers, layouts are designed manually, like fitting pieces of a puzzle, applying strategic patterns of key arrangements for favorable metrics. See the Keyboard layouts doc for detailed discussion of such patterns. Oxey’s Layout Playground and Cyanophage’s Layout Playground are useful tools for layout design. These are web apps where you can interactively drag the keys around, and metrics are recomputed on the fly to show the effect.

Designing a good layout is challenging:

Further reading

← More about keyboards