carpalx - keyboard layout optimizer - save your carpals
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. It's also the only keyboard layout that has its own fashion line.

download and explore

Download keyboard layouts, or run the code yourself to explore new layouts. Carpalx is licensed under CC BY-NC-SA 4.0.

layouts

Download and install the layouts.

Interpreting Optimization Results

configuration file : etc/tutorial-06.conf
output : out/tutorials/06

Configuration

This tutorial picks up where the concurrent optimization tutorial left off. Once you have collected a large number of output files (out/tutorials/04), one for each optimization instance, and identified the best-ranking candidates, you will probably want to generate images and reports for the layout candidates.

First, I'll set up what I want carpalx to do in the action string: draw the input keyboard, report statistics and word efforts. Also, I'll make a small adjustment to the output file name for the PNG image, and make it a function of the input keyboard_input (e.g. the keyboard in tmp-zjqgub.conf will be drawn as tmp-zjqgub.png).

...
action  = loadkeyboard,loadtriads,drawinputkeyboard,reporteffort,reportwordeffort,quit
...
pngfile_keyboard_input  = /home/martink/work/carpalx/dev/out/tutorials/06/__basename($CONF{keyboard_input},".conf")__.png
...

drawing keyboards

I can specify the keyboard_input file on the command line. However this needs to be specified relative to the main configuration file (i.e. relative to etc/).

> bin/carpalx -conf etc/tutorial-06.conf -keyboard_input out/tutorials/04/tmp-oovxkx.conf > out/tutorials/06/out.txt
Figure 1. Lowest effort layout from tutorial 04.

If you desire a more elaborate keyboard image, try the image parameters predefined as set 2.

...
imagedetaillevel = 2
imageparamset    = 2
...
Figure 2. Lowest effort layout from tutorial 04.
If you don't get the relative path right, carpalx will complain. For example if you use -keyboard_input out/tutorials/04/tmp-oovxkx.conf, the following message will appear

cannot file keyboard definition - /home/martink/work/perl/keyboard/carpalx-0.10/etc/out/tutorials/04/tmp-oovxkx.conf at bin/carpalx line 1453.

Based on the message, it's easy to correct the input path.

investigation effort components

The out/tutorials/06/out.txt file that we created above contains detailed information about effort of the best candidate, as well as statistics about finger and row usage.

Keyboard effort
------------------------------------------------------------
k1                      0.719  80.9  80.9
k1,k2                   0.871  17.1  97.9
k1,k2,k3                0.889   2.1 100.0
b                       0.392  23.1  23.1
p                       0.497  29.3 178.9
ph                      0.000   0.0   0.0
pr                      0.167  33.5  33.5
pf                      0.283  57.0  90.5
s                       0.808  47.6 100.0
all                     1.697 100.0 100.0

Look at the first column of numbers in the rows labeled b, p and s. These are the base, penalty and stroke efforts for the layout. The total energy is 1.697, and the components break down as 0.392 (base), 0.497 (penalty) and 0.808 (stroke).

Let's look at the finger frequency

keyboard finger frequency
------------------------------------------------------------
0                       10738  5.7   5.7
1                       19640 10.4  16.1
2                       23312 12.3  28.4
3                       41076 21.7  50.1
6                       51342 27.2  77.3
7                       27456 14.5  91.8
8                       15136  8.0  99.8
9                         323  0.2 100.0

The left pinky is used 5.7% of the time and the right pinky 0.2% of the time.

investigating the optimization process

If you capture the output of carpalx to an output file during optimization, you can return to this file and explore the course of effort during optimization. Below are a few plots of the layout effort for each iteration in a simulation of 10,000 iterations. These plots were generated using an old effort model, so the effort values are high.

Figure 3. Layout typing effort during optimization. The red line traces the effort of accepted transitions.
Figure 4. Effort change during accepted transitions during layout optimization. During the initial phase of the optimization both positive (worse) and negative (better) effort changes are accepted. Towards the end of the optimization, only desirable transitions (lower in effort) are accepted and, infrequently, marginally worse layouts.
Figure 5. Cooling schedule for the optimization. As the optimization runs, the probability of accepting a less desirable layout exponentially decreases.