Carpalx optimizes keyboard layouts to create ones that require less effort and significantly reduced carpal strain!

Have ideas? Tell me.

# the best layout

Partially optimized QWKRFY and fully optimized QGMLWY layouts are the last word in easier typing.

# the worst layout

A fully anti-optimized TNWMLC layout is a joke and a nightmare to type. It's also the only keyboard layout that has its own fashion line.

# layouts

25 Oct 21 — Added vertical and horizontal alphabetic layouts to the layouts analysis.

19 Mar 21 — Added BEAKL 15, Hieamtsr, Colemak Mod-DH and Mtgap 2.0 layouts to the layouts analysis.

15 Mar 21 — Added the Engram layout by Arno Klein to the layouts analysis.

6 Aug 20 — The search for the world’s best keyboard layout by Paul Guerin

4 May 20 — An interview with Bloomberg's Arianne Cohen Splurge on a Better Keyboard, It's Worth It.

25 May 18 — The BBC article Why we can't give up this off way of typing by Tim McDonald discusses the history and persistence of QWERTY and my Carpalx work.

16 Aug 16 — Ergonomic Keyboard Layout Designed for the Filipino Language at AHFE2016 derives layout for Filipino language using Carpalx

18 Apr 16 — Carpalx layouts soon to appear in freedesktop (package xkeyboard-config) and kbd. Thanks to Perry Thompson.

# Full Optimization - Q*MLW* Layouts

Three fully optimized layouts are presented here. Each provides an optimial typing experience with a slightly different letter mask. Use of the pinky is reduced and hand alternation is increased over popular alternatives like Colemak.

## Full Optimization

In contrast to the partial optimization, full optimization did not place a limit on how many keys could be relocated.

There are three full optimizations presented here, differing only in the location of punctuation and the position of ZXCV keys.

• QFMLWY - this is best layout obtained by relocating all QWERTY letters
• QGMLWB - this optimized layout uses a Colemak-like character layout
• QGMLWY - this is similar to the layout above, but keeps ZXCV in place

Each of these layouts is shown below. You can see that they are very similar. In particular, the home row is nearly identical, except where an additional letter key is made available in place of the ; key in the Colemak-like optimizations.

Figure 1. The canonical QWERTY layout.
Figure 2. When the QWERTY layout is fully optimized, with only the letter keys allowed to move, the resulting layout is QFMLWY and effort is reduced by 43%.
Figure 3. When a modified QWERTY layout is fully optimized (where the P and ; keys are swapped), the resulting layout is QGMLWB and effort is reduced by 44%. Note that ZXC maintain their position relative to QWERTY, as do Q and S.
Figure 4. When a modified QWERTY layout is fully optimized (where the P and ; keys are swapped) with ZXCV held in place, the resulting layout is QGMLWY and effort is reduced by 44%. Compare this layout, in which ZXCV are fixed, to QGMLWB (above) where these keys were not held fixed — only the V was moved.

The benefit of QFMLWY is that it maintains the QWERTY letter mask - no punctuation keys are moved. If this is an important layout characteristic, then this is the layout for you. If you are willing to relocate the ; key to the top row in order to add a letter to home row, then QGMLWB is the best choice. If you insist on ZXCV in QWERTY position, then QGMLWY is the best layout (although consider that QGMLWB has ZXC in QWERTY position already).

How do I know that the simulation has found a global minimum — in other words, the layout with the minimum effort? I don't. This uncertainty about global minimum discovery is present in all stochastic simulations of NP-hard problems (problem in which all potential solutions must be visited to determine a unequivocaly determine where the global minimum lies). For the full optimization described here, I ran the simulation at least 10,000 times. Each simulation lasted for >15,000 iterations and used k=10 and t0=10. For each optimization, multiple simulations converged on the reported layout. (details).

## Full Optimization - typing effort

The typing effort of the fully optimized layouts are compared in the table below and contrasted with QWERTY. Keep in mind that the difference between the optimized layouts is the additional character key on home row and mobility of ZXCV.

Full letter optimization - QGDLMY
model keyboard total effortrel% effort contributionsrel%
base penalties path
mod_01 qwerty 3.000

1.00033.3
1.00033.3
R0.408
F0.408
1.00033.3

qfmlwy 1.722 (-42.6)

0.51029.6 (-49.0)
0.47627.6 (-52.4)
R0.198 (-51.5)
F0.239 (-41.4)
0.73642.7 (-26.4)

qgmlwb 1.668 (-44.4)

0.38222.9 (-61.8)
0.57034.2 (-43.0)
R0.153 (-62.5)
F0.363 (-11.0)
0.71642.9 (-28.4)

qgmlwy 1.670 (-44.3)

0.38523.1 (-61.5)
0.57134.2 (-42.9)
R0.147 (-64.0)
F0.371 (-9.1)
0.71542.8 (-28.5)

When home row is given an extra character key, the base effort component drops significantly from 0.510 (optimized, QFMLWY) to 0.382 (optimized, QGMLWB). This is reasonable to expect because an additional letter is made available with zero finger travel distance. Notice, though, that the penalty component is increased from 0.476 to 0.570 (due to an increase in the finger-based component of the penalty). This presumably is a result of the fact that the pinky that services the additional home row key is more frequently used.

### QGMLWY vs Colemak

Let's compare the optimized layout to Colemak. I'll use QGMLWY, since this is the layout that keeps ZXCV in place and uses the Colemak-like letter mask. Note that the QGMLWB layout, which does not keep ZXCV fixed during optimization (but that nevertheless places ZXC in their QWERTY positions), is nearly identical in effort profile to QGMLWY, so the two can be used interchangeably.

Figure 5. The QGMLWY layout, a fully optimized Colemak-like layout.
Figure 6. The Colemak layout.
QGMLWY vs Colemak
model keyboard total effortrel% effort contributionsrel%
base penalties path
mod_01 qgmlwy 1.670

0.38523.1
0.57134.2
R0.147
F0.371
0.71542.8

colemak 1.842 (+10.3)

0.34418.7 (-10.6)
0.76341.4 (+33.6)
R0.158 (+7.5)
F0.487 (+31.3)
0.73539.9 (+2.8)

The first thing to notice is that Colemak seems to be designed to reduce finger travel distance. This is done at the cost of increasing penalty and stroke path. Colemak has both a higher row and a higher finger penalty component. In fact, the finger penalty component is 31% higher. Therefore, in the Colemak layout shorter finger travel distance is prefered over decrease use of weaker fingers.

The detailed finger and row use statistics for QGMLWY and Colemak are shown below. Both keyboards have the same home row frequency (74%), with QGMLWY having a lower bottom row use (6% vs Colemak's 9%). This reduction in bottom row usage is a result of the row-based penalty component, which penalizes the bottom row (recall that the model parameters result in a penalty ratio of 1:0:2 for the top:home:bottow rows).

carpalx effort optimization keyboard name statistics effort
rowh rowb hand asym finger freq cumulative run distribution mod_01
full Colemak-like optimization, ZXCV fixed qgmlwy
QGMLWYFUB;[]\
DSTNRIAEOH'
ZXCVJKP,./
0.74 0.06 -0.06 0.11
0.18
0.29
0.42
1 2 3 4 5 6 7 8 9
rhl 0.60 0.91 0.99 1 1 1 1 1 1
rhr 0.56 0.85 0.94 0.98 0.99 1 1 1 1
rh 0.58 0.88 0.96 0.99 1 1 1 1 1
rrt 0.77 0.96 0.99 1 1 1 1 1 1
rrh 0.26 0.46 0.60 0.71 0.79 0.85 0.89 0.92 0.94
rrb 0.93 1 1 1 1 1 1 1 1
rr 0.55 0.72 0.81 0.86 0.90 0.93 0.95 0.96 0.97
rf 0.92 0.99 1 1 1 1 1 1 1
rj 0.85 0.96 0.99 1 1 1 1 1 1
1.670
0.38523.0%
0.57134.2%
0.71542.8%
none Colemak
QWFPGJLUY;[]\
ARSTDHNEIO'
ZXCVBKM,./
0.74 0.09 -0.06 0.16
0.17
0.26
0.41
1 2 3 4 5 6 7 8 9
rhl 0.55 0.85 0.94 0.98 0.99 1 1 1 1
rhr 0.49 0.77 0.90 0.96 0.98 0.99 1 1 1
rh 0.52 0.81 0.92 0.97 0.99 0.99 1 1 1
rrt 0.79 0.97 0.99 1 1 1 1 1 1
rrh 0.26 0.46 0.60 0.71 0.79 0.85 0.89 0.92 0.94
rrb 0.95 1 1 1 1 1 1 1 1
rr 0.57 0.73 0.81 0.86 0.90 0.93 0.95 0.96 0.97
rf 0.93 1 1 1 1 1 1 1 1
rj 0.83 0.95 0.99 1 1 1 1 1 1
1.842
0.34418.7%
0.76341.4%
0.73539.9%

Hand asymmetry is identical for both layouts, at 6% with the left hand favoured. However, QGMLWY is better at hand alternation, with one-character hand runs (i.e. a given hand is used to type only one character before the other hand is used) at 60% and 56% of keystrokes for the left and right hands, respectively. Colemak has 55% and 49% for these values.

Finger frequencies differ mainly in the use of the pinky, which is penalized in my model. Thus, QGMLWY uses the pinky 11% whereas Colemak uses the pinky 16% of the time. Colmak's 1-finger run is slightly higher, at 93% compared to 92% for QGMLWY. This is due to the reduced pinky usage in QGMLWY.

### QGMLWY vs Norman

The Norman layout is a partially optimized layout by David Norman. It modifies 14/26 letter keys, as shown in the figure below. It maintains locations of Q W A S Z X C V keys to maintain keyboard shortcuts. With the exception of the A and W key, QGMLWY maintain these locations as well.

It does a very good job in minimizing the finger travel distance. Its base effort is 0.342, which is in the neighbourhood of Colemak, Workman and Klausler layouts. According to the Carpalx effort model, it does as poor job in managing row and finger penalties—with 4 fewer key relocations QWKRFY manages a 40% reduction in these penalties over Norman.

QWKRFY vs Norman - english corpus
model keyboard total effortrel% effort contributionsrel%
base penalties path
mod_01 qgmlwy 1.670

0.38523.1
0.57134.2
R0.147
F0.371
0.71542.8

norman 1.992 (+19.3)

0.34217.2 (-11.2)
0.81240.8 (+42.2)
R0.191 (+29.9)
F0.508 (+36.9)
0.83842.1 (+17.2)

colemak 1.842 (+10.3)

0.34418.7 (-10.6)
0.76341.4 (+33.6)
R0.158 (+7.5)
F0.487 (+31.3)
0.73539.9 (+2.8)

Detailed finger usage statistics for Norman are shown below. Norman has a lower usage of home row (68% vs 74%), higher bottom row usage (10% vs 6%), and favours the left hand by 5%.

Norman finger frequencies for pinky, ring, middle and and index finger are 15, 21, 32, 33%. Pinky gets hammered frequencies.

carpalx effort optimization keyboard name statistics effort
rowh rowb hand asym finger freq cumulative run distribution mod_01
full Colemak-like optimization, ZXCV fixed qgmlwy
QGMLWYFUB;[]\
DSTNRIAEOH'
ZXCVJKP,./
0.74 0.06 -0.06 0.11
0.18
0.29
0.42
1 2 3 4 5 6 7 8 9
rhl 0.60 0.91 0.99 1 1 1 1 1 1
rhr 0.56 0.85 0.94 0.98 0.99 1 1 1 1
rh 0.58 0.88 0.96 0.99 1 1 1 1 1
rrt 0.77 0.96 0.99 1 1 1 1 1 1
rrh 0.26 0.46 0.60 0.71 0.79 0.85 0.89 0.92 0.94
rrb 0.93 1 1 1 1 1 1 1 1
rr 0.55 0.72 0.81 0.86 0.90 0.93 0.95 0.96 0.97
rf 0.92 0.99 1 1 1 1 1 1 1
rj 0.85 0.96 0.99 1 1 1 1 1 1
1.670
0.38523.0%
0.57134.2%
0.71542.8%
none Norman
QWDFKJURL;[]\
ASETGYNIOH'
ZXCVBPM,./
0.68 0.10 0.05 0.15
0.21
0.32
0.33
1 2 3 4 5 6 7 8 9
rhl 0.47 0.76 0.89 0.95 0.98 0.99 1 1 1
rhr 0.56 0.80 0.92 0.97 0.99 0.99 1 1 1
rh 0.52 0.78 0.91 0.96 0.98 0.99 1 1 1
rrt 0.79 0.96 0.99 1 1 1 1 1 1
rrh 0.37 0.58 0.72 0.82 0.88 0.92 0.95 0.97 0.98
rrb 0.94 1 1 1 1 1 1 1 1
rr 0.62 0.79 0.87 0.92 0.94 0.96 0.98 0.99 0.99
rf 0.90 0.99 1 1 1 1 1 1 1
rj 0.77 0.92 0.98 0.99 1 1 1 1 1
1.992
0.34217.2%
0.81240.8%
0.83842.1%

## Full Optimization - detailed statistics

In the table below, I show the detailed statistics for all the three optimized layouts, together with Colemak.

carpalx effort optimization keyboard name statistics effort
rowh rowb hand asym finger freq cumulative run distribution mod_01
full Colemak-like optimization qgmlwb
QGMLWBYUV;[]\
DSTNRIAEOH'
ZXCFJKP,./
0.74 0.07 -0.03 0.11
0.17
0.29
0.43
1 2 3 4 5 6 7 8 9
rhl 0.56 0.90 0.99 1 1 1 1 1 1
rhr 0.58 0.86 0.95 0.98 0.99 1 1 1 1
rh 0.57 0.88 0.97 0.99 1 1 1 1 1
rrt 0.79 0.96 0.99 1 1 1 1 1 1
rrh 0.26 0.46 0.60 0.71 0.79 0.85 0.89 0.92 0.94
rrb 0.92 1 1 1 1 1 1 1 1
rr 0.56 0.73 0.81 0.86 0.90 0.93 0.95 0.96 0.97
rf 0.91 0.99 1 1 1 1 1 1 1
rj 0.84 0.95 0.99 1 1 1 1 1 1
1.668
0.38222.9%
0.57034.2%
0.71642.9%
full Colemak-like optimization, ZXCV fixed qgmlwy
QGMLWYFUB;[]\
DSTNRIAEOH'
ZXCVJKP,./
0.74 0.06 -0.06 0.11
0.18
0.29
0.42
1 2 3 4 5 6 7 8 9
rhl 0.60 0.91 0.99 1 1 1 1 1 1
rhr 0.56 0.85 0.94 0.98 0.99 1 1 1 1
rh 0.58 0.88 0.96 0.99 1 1 1 1 1
rrt 0.77 0.96 0.99 1 1 1 1 1 1
rrh 0.26 0.46 0.60 0.71 0.79 0.85 0.89 0.92 0.94
rrb 0.93 1 1 1 1 1 1 1 1
rr 0.55 0.72 0.81 0.86 0.90 0.93 0.95 0.96 0.97
rf 0.92 0.99 1 1 1 1 1 1 1
rj 0.85 0.96 0.99 1 1 1 1 1 1
1.670
0.38523.0%
0.57134.2%
0.71542.8%
full QWERTY optimization qfmlwy
QFMLWYUOBJ[]\
DSTNRIAEH;'
ZVGCXPK,./
0.66 0.08 -0.02 0.05
0.17
0.34
0.44
1 2 3 4 5 6 7 8 9
rhl 0.57 0.90 0.99 1 1 1 1 1 1
rhr 0.60 0.88 0.96 0.99 1 1 1 1 1
rh 0.58 0.89 0.97 0.99 1 1 1 1 1
rrt 0.59 0.87 0.96 0.99 0.99 1 1 1 1
rrh 0.29 0.50 0.66 0.77 0.84 0.90 0.93 0.95 0.97
rrb 0.94 1 1 1 1 1 1 1 1
rr 0.51 0.72 0.83 0.89 0.93 0.95 0.97 0.98 0.98
rf 0.91 0.99 1 1 1 1 1 1 1
rj 0.85 0.97 0.99 1 1 1 1 1 1
1.722
0.51029.6%
0.47627.6%
0.73642.8%
none Colemak
QWFPGJLUY;[]\
ARSTDHNEIO'
ZXCVBKM,./
0.74 0.09 -0.06 0.16
0.17
0.26
0.41
1 2 3 4 5 6 7 8 9
rhl 0.55 0.85 0.94 0.98 0.99 1 1 1 1
rhr 0.49 0.77 0.90 0.96 0.98 0.99 1 1 1
rh 0.52 0.81 0.92 0.97 0.99 0.99 1 1 1
rrt 0.79 0.97 0.99 1 1 1 1 1 1
rrh 0.26 0.46 0.60 0.71 0.79 0.85 0.89 0.92 0.94
rrb 0.95 1 1 1 1 1 1 1 1
rr 0.57 0.73 0.81 0.86 0.90 0.93 0.95 0.96 0.97
rf 0.93 1 1 1 1 1 1 1 1
rj 0.83 0.95 0.99 1 1 1 1 1 1
1.842
0.34418.7%
0.76341.4%
0.73539.9%
none QWERTY standard
QWERTYUIOP[]\
ASDFGHJKL;'
ZXCVBNM,./
0.34 0.15 0.15 0.10
0.21
0.27
0.42
1 2 3 4 5 6 7 8 9
rhl 0.42 0.69 0.83 0.91 0.95 0.97 0.99 0.99 1
rhr 0.61 0.83 0.94 0.98 0.99 1 1 1 1
rh 0.51 0.76 0.88 0.94 0.97 0.98 0.99 1 1
rrt 0.55 0.78 0.91 0.96 0.98 0.99 1 1 1
rrh 0.68 0.91 0.97 0.99 1 1 1 1 1
rrb 0.94 1 1 1 1 1 1 1 1
rr 0.68 0.88 0.95 0.98 0.99 1 1 1 1
rf 0.89 0.99 1 1 1 1 1 1 1
rj 0.68 0.83 0.94 0.96 0.99 0.99 1 1 1
3.000
1.00033.3%
1.00033.3%
1.00033.3%

## Full Optimization - Convergence and Neighbouring Solutions

Let's take a look at simulation runs that generated the three optimized layouts presented here. Remember that each layout was the lowest effort solution out of a large family of solutions generated by the simulation. It may be that even lower effort solutions exist and that they have not been found by the simulation. This isn't very likely and it's not possible to know whether such a lower-effort state exists.

Each of the three layout discoveries was repeated between ~16,000 and ~21,000 times. The QWERTY optimization that resulted in the QFMLWY layout converged three times to this layout. This means that QFMLWY was the solution in 3/15,961 of the runs. On the other hand, the Colemak mask with ZCXV stationary converged 406/20,797 times to QGMLWY — fixing four keys constrains the problem significantly and results in faster convergence. I believe that the QGMLWY layout is the global minimum for this set of parameters.

Figure 7. Frequency distribution of typing effort for solutions to the layout simulation.

### neighbouring solutions to QFMLWY

Below are the three lowest-effort solutions to QWERTY optimization. The lowest effort solution is QFMLWY, as described above. The next lowest solution is JBFUYW and is quite different from QFMLWY. The home row of this solution is nearly reversed — in fact this solution nearly mirrors (left-to-right) the top QFMLWY solution. It is reasonable that this be the case since there is no inherent left/right asymmetry in the penalties or model. The QWERTY mask has a slight asymmetry because, unlike the left pinky, the right pinky does not service a letter key.

The third best solution is QFMLWY, and is very similar to the top solution, varying only in the placement of V, X and J.

$1.7216 (lowest effort found) q f m l w y u o b j d s t n r i a e h z v g c x p k 1.7218 (+0.002) j b f u y w l d g q h o e a i r n t s z v p k x m c 1.7224 (+0.0008) q f m l w y u o b v d s t n r i a e h z x g c j p k 1.7226 (+0.0010) j f m l w y u o b v d s t n r i a e h z x g c q p k$

### neighbouring solutions to QGMLWB

These are the top four solutions to the Colemak-like mask optimization. Unlike the neighbouring solutions to QFMLWY, the top four here do not include a mirror flip. The home row for each of these solutions is identical. The four only vary in the position of G, K, C, X, M, J, F, P. Most of the variation is in the bottom row.

$total base/penalty/path 1.6677 0.382/0.570/0.716 (lowest effort found) q g m l w b y u v d s t n r i a e o h z x c f j k p 1.6678 0.383/0.564/0.722 (+0.0001) q k c l w b y u v d s t n r i a e o h z x g m j f p 1.6681 0.383/0.571/0.716 (+0.0004) q g m l w b y u v d s t n r i a e o h z j c f x p k 1.6683 0.382/0.564/0.722 (+0.0006) q k c l w b y u v d s t n r i a e o h z j g m x f p$

In the top four solutions there is still some fluctuation in the penalty and path component efforts (~1%). This is much larger than the difference in total effort (<0.05%) or the fluctuation in the base effort component (<0.5%).

### neighbouring solutions to QGMLWY

Neighbours to the best ZXCV-fixed solution QGMLWY are very similar layouts that vary in the position of U, F, Y, K, P.

$1.6704 (lowest effort found) q g m l w y f u b d s t n r i a e o h z x c v j k p 1.6706 (+0.0002) q g m l w f y u b d s t n r i a e o h z x c v j k p 1.6713 (+0.0009) q g m l w y u f b d s t n r i a e o h z x c v j p k 1.6714 (+0.0010) q g m l w p y u b d s t n r i a e o h z x c v j k f$

## QGMLWY - word difficulty

Using the typing effort model described in Carpalx - Typing Effort, I ranked 6-12 character words by their corresponding effort (effort is normalized to word length) using a dictionary of 480,000 words (/usr/share/dict/words, Red Hat 4 Enterprise). Below is a table that shows sets of words representing effort percentiles.

QGMLWY ENGLISH Word Efforts
average effort percentile wordeffort
5.1 hardest zyzzyva6.2 zyzzyvas5.6 dozzle5.5 guzzle5.5 puzzle5.4 zizzle5.3 buzzle5.3 wuzzle5.3 muzzle5.2 zobkiw5.1 sozzly5.1 fuzzle5.1 sozzle5.1 buzzwig5.0 buzzbomb5.0 gozzan4.9 pizzle4.9 jazzbow4.9 mizzly4.8 nuzzle4.8 tuzzle4.8 mizzle4.8 guzzler4.8 fizzle4.8 dozzled4.8
2.5 90% colluded2.5 colophonic2.5 compliments2.5 euchred2.5 euchres2.5 flacks2.5 gnomological2.5 legibly2.5 nazimova2.5 paupers2.5 unfrozen2.5
2.2 80% bluelegs2.2 hydrosolic2.2 midfields2.2 myxangitis2.2 neuromyic2.2 siliconize2.2 soudgy2.2 sphacelus2.2 spitzes2.2 unfulfil2.2 wonderbright2.2
2.1 70% balaghaut2.1 biddelian2.1 bisayas2.1 camooch2.1 forgot2.1 hoofers2.1 incomputable2.1 milltown2.1 phenacyl2.1 wretchock2.1 youngun2.1
1.9 60% catchweed1.9 gilead1.9 gilten1.9 libels1.9 magnascopic1.9 margin1.9 orcine1.9 palacios1.9 sullage1.9 summage1.9 uranoscopy1.9
1.8 50% antiopium1.8 basile1.8 bedlamised1.8 besigh1.8 disquisition1.8 incursive1.8 ladler1.8 lauder1.8 overdigest1.8 rasping1.8 sparing1.8
1.7 40% androclinia1.7 cadelle1.7 carioling1.7 draftwoman1.7 edmore1.7 hektoliter1.7 intrusively1.7 palmerite1.7 rachitogenic1.7 shouters1.7 watercolour1.7
1.6 30% bourtrees1.6 crofts1.6 curtest1.6 disserve1.6 fussing1.6 gaberdine1.6 glinted1.6 longstreet1.6 orthodromy1.6 tendrillar1.6 wrenching1.6
1.4 20% ayegreen1.4 expedience1.4 faenus1.4 fossane1.4 fossate1.4 loosest1.4 nalani1.4 telega1.4 tussors1.4 tutelo1.4 unregistered1.4
1.2 10% arbitrator1.2 brittaney1.2 foresend1.2 lalittah1.2 mastodontoid1.2 monistic1.2 motioned1.2 outstink1.2 reparations1.2 resultants1.2 snarliest1.2
0.2 easiest etnean0.1 ennead0.1 enneads0.2 anteed0.2 anneal0.2 atteal0.2 antennae0.2 teensy0.2 anteal0.2 teenty0.2 anneals0.2 tannie0.2 etters0.2 neenah0.2 attars0.2 attent0.2 attend0.2 teenie0.2 eatton0.2 treats0.2 treens0.2 neatness0.2 neatly0.3 annatto0.3 annette0.3 antenna0.3