carpalx - keyboard layout optimizer - save your carpals

Japanese version and translation details.

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

Download keyboard layouts, or run the code yourself to explore new layouts.

X11 layouts are available! Many thanks to Sven Hallberg for providing X11 configuration for Carpalx layouts. Richard Gomes contributed an archive of these files for KDE/Gnome users.

Love your coworkers? Switch them to QWKRFY layout or a fully optimized QGMLWY layout.

Hate your coworkers? Switch them to TNWMLC layout. It's the only keyboard layout that has its own fashion line.

Have ideas? Tell me.

9/sep/14 — Working on a project with De Correspondent—Dutch readers should be excited

18/may/14 — Updating text — some of the copy needs to be reworked.

17/may/14 — Made the CSS less useless.

16/may/14 — Added evaluation of the Norman layout. This layout modifies 14/26 keys and has statistics similar to Colemak. Detailed statistics are available.

12/feb/14 — Added evaluation of the abKey layout. Its alphabetic layout makes no attempt at ergonomics. Detailed statistics are available.

Partial Optimization - QWKRFY (5 swap) and QWYRFM (10 swap) Layouts

Five (and Ten) Most Effective Key Swaps

If switching to Dvorak or Colemak is not an option for you, consider modifying your layout one key swap at a time. Not surprisingly, you do not need to remap the entire keyboard to reap the rewards of a more efficient layout. The location of a few frequently used keys on QWERTY are responsible for a disproportionately large effort. By identifying a few keys with the largest contribution to effort, one can relocate them to obtain a significantly easier-to-use layout.

The largest effort reduction that can be made in 5 keys swaps yields QWKRFY layout, shown below.

Figure 1 | The QWKRFY layout is the most efficient layout created by swapping 5 key pairs on QWERTY. The keys swaps that generate this layout are K/E, J/O, F/T, A/D and G/N. The order of keyswaps, in decreasing order of impact on effort, is shown in blue.

If we consider 10 keys waps, the resulting layout is QWYRFM, shown below.

Figure 2 | The QWYRFM layout is the most efficient layout created by swapping 10 key pairs on QWERTY. The keys swaps that generate this layout are K/E, J/O, F/T, A/D, G/N, L/I, M/K, B/J, U/L and Y/M. The order of keyswaps, in decreasing order of impact on effort, is shown in blue. This layout achieves a marginal effort reduction over the 5-swap QWKRFY layout.

Each successive swap results in a smaller relative effort decrease. The first swap exchanges K/E and reduces effort by 13.4%. The fifth swap exchanges G/N and reduces effort by 5.6%. After the fifth swap, each successive effort decrease quickly drops to 2.9% (6th swap) and then 1.4% (7th swap) and 1% or lower for subsequent swaps.

In the table below, I have also shown the best next 5 swaps. These reduce the effort by another 4% or so.

swap step swapeffort
mod_01
start QWERTY3.000
1 K/E2.597 (-13.4%)
2 J/O2.308 (-11.1%)
3 F/T2.100 (-9.0%)
4 D/A1.979 (-5.8%)
5 G/N1.868 (-5.6%)
5-swap layout QWKRFY1.868 (-37.7%)
6 L/I1.814 (-2.9%)
7 M/K*1.789 (-1.4%)
8 B/J*1.771 (-1.0%)
9 L*/U1.761 (-0.6%)
10 Y/M*1.755 (-0.3%)
10 swap layout QWYRFM1.755 (-41.5%)

(*) in the above table indicates that this key has been relocated in a previous swap.

From an efficiency perspective, it's clear that each additional swap brings a lower reduction in effort. The 6th swap is the first one that reduces effort by less than 5% and the 7th swap is the first that relocates a previously swapped key (K). Looking at the progression of effort decrease, if I had to limit the number of swaps to obtain a more efficient layout, I would stop after the 5th swap.

Partially Optimized Layout Efforts

The breakdown in how individual effort components are affected by the key swaps is detailed in the table below. Both base and penalty effort components were reduced significantly in QWKRFY, by 50% and 51% respectively, with the stroke path component reduction being the smallest, at 11%.

QWKRFY typing effort - most efficient 5 key swap layout
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

qwkrfy 1.868 (-37.7)

0.49526.5 (-50.5)
0.48726.1 (-51.3)
R0.207 (-49.3)
F0.236 (-42.2)
0.88647.4 (-11.4)

qwyrfm 1.755 (-41.5)

0.42824.4 (-57.2)
0.50528.8 (-49.5)
R0.175 (-57.1)
F0.285 (-30.1)
0.82246.8 (-17.8)

Notice that while the overall effort has decreased from the 5-swap to the 10-swap layout, the penalty component has actually increased. This increase was possible because the base and stroke path components decreased relatively more substantially. You can see that that finger-based penalty for QWYRFM is actually higher (0.285) than QWKRFY (0.236) - presumably this is because increasing usage frequency of the the ring and pinky finger are required to lower the other effort components.

QWKRFY vs Dvorak

How much can be achieved in 5 keys swaps? It turns out that the resulting effort reduction produces a layout with a total effort that is lower than Dvorak - 11% lower. The gains are made entirely in the penalty component, and specifically in the finger-based penalty. Dvorak makes extensive use of the pinky (18%), and this gives it a relatively high finger penalty (both in absolute terms, and relative to the row-based penalty &mdash finger-based penalty (0.638) is nearly 4x higher than row-based (0.171)).

QWKRFY vs Dvorak - english corpus
model keyboard total effortrel% effort contributionsrel%
base penalties path
mod_01 dvorak 2.098

0.39718.9
0.93744.7
R0.171
F0.638
0.76536.5

qwkrfy 1.868 (-11.0)

0.49526.5 (+24.7)
0.48726.1 (-48.0)
R0.207 (+21.1)
F0.236 (-63.0)
0.88647.4 (+15.8)

QWKRFY/QWYRFM vs Norman

The Norman layout is a fully 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 key, which is swapped with D, QWKRFY and QWYRFM maintain these locations as well. Because it advertises itself as easy to learn, I thought I would compare it to the partially optimized layouts QWKRFY (5 key swaps) and QWYRFM (10 keys swaps).

Figure 3 | The Norman layout is another partially optimized layout. It modifies 14/26 letters. Here the keys relocated by Norman, QWKRFY (5 keys swaps) and QWYRFM (10 keys swaps) are compared.

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 norman 1.992

0.34217.2
0.81240.8
R0.191
F0.508
0.83842.1

qwkrfy 1.868 (-6.2)

0.49526.5 (+44.7)
0.48726.1 (-40.0)
R0.207 (+8.4)
F0.236 (-53.5)
0.88647.4 (+5.7)

qwyrfm 1.755 (-11.9)

0.42824.4 (+25.1)
0.50528.8 (-37.8)
R0.175 (-8.4)
F0.285 (-43.9)
0.82246.8 (-1.9)

Detailed finger usage statistics for QWKRFY and Norman are shown below. In this comparison, keep in mind that QWKRFY modifies 10 keys whereas norman modifies 14 keys. Norman has a slightly higher usage of home row (68% vs 65%) but also a high hand asymmetry (5% vs 2%) (i.e. left hand is favoured by 5%).

The big differences are in the finger frequencies. Pinky, ring, middle and and index finger frequencies for Norman are 15, 21, 32, and 33%. QWKRFY manages to lower the useage of pinky and ring fingers substantially, with frequencies of 6, 13, 31, 50%. With QWKRFY, the index finger is loaded. Norman statistics are similar to that of Colemak, which modifies 16 keys, with the exception that Colemak favours the right hand (negative hand asymmetry), has higher home row use and weighs usage more towards the index finger.

carpalx effort optimization keyboard name statistics effort
rowh rowb hand asym finger freq cumulative run distribution mod_01
partial min (5 swap) 5 steps to typing heaven version 1
QWKRFYUIJP[]\
DSATNHOEL;'
ZXCVBGM,./
0.65 0.10 0.02 0.06 0.13 0.31 0.50
1 2 3 4 5 6 7 8 9
rhl 0.51 0.81 0.91 0.96 0.98 0.99 1 1 1
rhr 0.54 0.81 0.92 0.97 0.99 1 1 1 1
rh 0.52 0.81 0.92 0.97 0.99 0.99 1 1 1
rrt 0.79 0.95 0.99 1 1 1 1 1 1
rrh 0.39 0.59 0.74 0.84 0.90 0.94 0.96 0.98 0.98
rrb 0.96 1 1 1 1 1 1 1 1
rr 0.64 0.80 0.88 0.93 0.95 0.97 0.98 0.99 0.99
rf 0.87 0.98 1 1 1 1 1 1 1
rj 0.79 0.93 0.97 0.99 1 1 1 1 1
1.868
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
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

QWKRFY vs Colemak

Colemak has significantly lower base effort (0.344 vs 0.495) and a lower stroke path (0.735 vs 0.886) but a much higher penalty effort (0.763 vs 0.487). The higher penalty is due to Colemak's greater use of the pinky (16%).

QWKRFY vs Dvorak - english corpus
model keyboard total effortrel% effort contributionsrel%
base penalties path
mod_01 colemak 1.842

0.34418.7
0.76341.4
R0.158
F0.487
0.73539.9

qwkrfy 1.868 (+1.4)

0.49526.5 (+43.9)
0.48726.1 (-36.2)
R0.207 (+31.0)
F0.236 (-51.5)
0.88647.4 (+20.5)

Partially Optimized Layout - detailed statistics

Frequency and cumulative run statistics for QWRKFY are shown below and compared to Dvorak and Colemak. Please keep in mind that the partially optimized QWKRFY layout relocates a limited number of keys (only 10). The partially optimized layout improves home row usage to 65% (QWERTY is 34%) and significantly reduces hand asymmetry to 2% (favouring the left hand). Finger frequency is very heavily weighted towards the strong index (50%) and middle (81%) fingers. In total 81% of keystrokes are performed by the strong index and middle fingers, which is an improvement over Dvorak's 60%, Colemak's 67% and QWERTY's 69%.

The ideal finger use frequency is difficult to define. One can either load the strong fingers more heavily (such as in QWKRFY, and due to the finger-based penalty) or divide the work across all fingers more evenly. Whether using the weaker pinky to lessen the burden on stronger fingers is appropriate is ultimately up to you.

QWRKFY does a very good job at maintaining hand alternation, with one-stroke hand run of 52% (this means that for half of successive key stroke pairs, hand use switched). In fact, it does a better job at it than Colemak.

carpalx effort optimization keyboard name statistics effort
rowh rowb hand asym finger freq cumulative run distribution mod_01
partial min (5 swap) 5 steps to typing heaven version 1
QWKRFYUIJP[]\
DSATNHOEL;'
ZXCVBGM,./
0.65 0.10 0.02 0.06 0.13 0.31 0.50
1 2 3 4 5 6 7 8 9
rhl 0.51 0.81 0.91 0.96 0.98 0.99 1 1 1
rhr 0.54 0.81 0.92 0.97 0.99 1 1 1 1
rh 0.52 0.81 0.92 0.97 0.99 0.99 1 1 1
rrt 0.79 0.95 0.99 1 1 1 1 1 1
rrh 0.39 0.59 0.74 0.84 0.90 0.94 0.96 0.98 0.98
rrb 0.96 1 1 1 1 1 1 1 1
rr 0.64 0.80 0.88 0.93 0.95 0.97 0.98 0.99 0.99
rf 0.87 0.98 1 1 1 1 1 1 1
rj 0.79 0.93 0.97 0.99 1 1 1 1 1
1.868
partial min (10 swap) 10 steps to typing heaven version 1
QWYRFMLUBP[]\
DSATNHOEI;'
ZXCVJGK,./
0.68 0.07 0.02 0.06 0.17 0.28 0.48
1 2 3 4 5 6 7 8 9
rhl 0.51 0.80 0.91 0.95 0.98 0.99 1 1 1
rhr 0.52 0.81 0.92 0.97 0.99 1 1 1 1
rh 0.52 0.81 0.91 0.96 0.98 0.99 1 1 1
rrt 0.72 0.94 0.98 1 1 1 1 1 1
rrh 0.37 0.56 0.70 0.80 0.87 0.91 0.94 0.96 0.97
rrb 0.95 1 1 1 1 1 1 1 1
rr 0.58 0.77 0.85 0.90 0.94 0.96 0.97 0.98 0.99
rf 0.89 0.99 1 1 1 1 1 1 1
rj 0.79 0.94 0.98 0.99 1 1 1 1 1
1.755
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
none Dvorak standard
',.PYFGCRL/=\
AOEUIDHTNS-
;QJKXBMWVZ
0.71 0.09 -0.14 0.18 0.21 0.26 0.34
1 2 3 4 5 6 7 8 9
rhl 0.76 0.94 0.98 0.99 1 1 1 1 1
rhr 0.47 0.81 0.96 0.99 1 1 1 1 1
rh 0.62 0.88 0.97 0.99 1 1 1 1 1
rrt 0.80 0.97 1 1 1 1 1 1 1
rrh 0.33 0.54 0.67 0.77 0.85 0.90 0.93 0.95 0.97
rrb 0.96 1 1 1 1 1 1 1 1
rr 0.60 0.77 0.84 0.89 0.93 0.95 0.97 0.98 0.98
rf 0.93 1 1 1 1 1 1 1 1
rj 0.84 0.96 0.99 1 1 1 1 1 1
2.098
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

CarpalxQ - user contribution

This layout was contributed by Jay Walker, who describes the motivation and creation of layout on his site. The key swaps are E/K, T/F, N/J, I/L, O/; and ;/P. Notice that the CarpalxQ layout swaps not only letter keys, but also the punctuation key for ; thereby moving more letters onto home row (this kind of swap was not allowed in the generation of QWKRFY, a layout in which only letter keys were eligible for swaps).

Figure 4 | The CarpalxQ layout is contributed by Jay Walker, which as he describes on his site is created with 6 swaps of keys. Compare this layout with QWKRFY (shown below) which was generated by making 5 swaps.
Figure 5 | The QWKRFY layout was generated from QWERTY by making first five most effort-reducing key swaps.

The table below shows the effort for CarpalxQ and compares it to QWKRFY. CarpalxQ is strong in the base and path efforts, but suffers a high finger-based penalty.

QWKRFY vs CarpalxQ - english corpus
model keyboard total effortrel% effort contributionsrel%
base penalties path
mod_01 qwkrfy 1.868

0.49526.5
0.48726.1
R0.207
F0.236
0.88647.4

carpalxq 1.954 (+4.6)

0.37219.0 (-24.8)
0.79040.4 (+62.2)
R0.173 (-16.4)
F0.489 (+107.2)
0.79340.6 (-10.5)

qwpr - user contribution

Jameson Quinn has created the qwpr layout which requires minimal retraining. It relocates 11 keys, with only 2 (p and e) switching fingers. Mac OS X and Windows files are available.