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 — A new layout—De Correspondent—for the Dutch language in collaboration with De Correspondent.

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.

carpalx — design your own keyboard

Save your carpals and reach typing guru status with your own keyboard layout, such as the fully optimized QGMLWB layout. Alternatively, use your power for evil and create a carpal-breaking TNWMLC layout to embarass office prima donnas and punish sluggish workers. And it's the only layout with its own line of Brazilian clothing.

Purpose of Carpalx

The carpalx project introduces a quantitative model for typing effort and applies it to (a) evaluate QWERTY and popular alternatives, such as Dvorak and Colemak and (b) find the keyboard layouts that minimize typing effort for a given set of input documents. In the work presented here, these documents are English text, but they can be anything, such as corpora in French, Spanish and even programming languages, like C or Python.

While there are many alternate layouts, the Carpalx project proposes new layouts and a fully-baked parametric model of typing effort. Way!

Carpalx in Brazilian Fashion

In a collaboration that brings keyboard layout design and fashion together—what a combination!—Brazilian designer Julia Valle used the carpalx worst layout (TNWMLC) as a design element in her Winter 2011 line.

The work was shown in a show in Rio de Janeiro. Julia accented the clothes with beautiful necklaces made out of parts of an 1956 Smith Corona typewriter.

This project is nearly cosmic in alignment of eclectic interests. Keyboard layout research is subverted to generate the most difficult English layout, which is then transformed into beautiful clothing design. This cross-pollination of ideas has particular meaning to me, since I once dabbled in fashion photography.

QWERTY - you're fired

Try typing "stewardesses". Tough, eh? Type the word several times and your left hand will need a break. Now type "chrząszcz" (Polish for "beetle"). Nearly impossible, eh? Type the word once and you've had enough. The problem isn't you—it's your keyboard layout. Well, maybe it's you but solving that falls outside my mandate.

Figure 1 | The ubiquitous QWERTY keyboard layout. Chances are good that your keyboard layout is based on this arrangement of keys. If your language isn't English, your layout may differ significantly from QWERTY.

The QWERTY layout is a boon and a bane. It is a boon because it's everywhere and, if you learn to type on it, your skill is portable. It's a bane because its design makes typing more difficult than it should be (this was one of the purposes of this layout — limiting typists' speed mitigated the jamming of mechanical typewriters).

Of course, the limitation with any layout is that it excels for only one kind of text (e.g. English). If you spend your time typing two or more different languages and maintain the same layout, one of the languages will be more difficult to type. If you are writing computer code, it's likely that the code is significantly different (in terms of character frequency and combination) than your spoken language. Although interpreted languages like Ruby help reduce the noise found in other languages like Perl (I like both!), it's still likely that frequently used characters in programming (e.g. = + -) continue to be relegated to the backwaters of the keyboard.

In these pages, I will explore other layouts and indicate their strengths and weaknesses. I will also propose a few new layouts that were derived computationally using the carpalx typing effort model.

History of Carpalx

Redesigning a keyboard layout isn't as simple as 1-2-3. Or in this case, x-y-z where x, y, z are ordered to minimize typing effort! The real difficulty in layout design lies in defining how to measure typing effort. In other words, given a set of constraints it is easy to find a layout that minimizes them — it's defining the constraints that is hard!

I originally started working on Carpalx to determine whether I could recreate the Dvorak layout by developing a model of typing effort. My initial (and naive) hope was to create a parametric model that, when tweaked just so, would create Dvorak. In other words, I wanted to know what set of variables were minimized in the Dvorak layout.

When I ran the optimization for my initial model design, I quickly obtained keyboard layouts that had a much lower effort than Dvorak — in other words, I improved on Dvorak (according to my model) immediately. Furthermore, it quickly became clear that hunting for a model that would generate Dvorak was a hopeless task, because the number of models, unlike the number of layouts, is uncountably infinite. I adjusted my goal, therefore, from hunting for a model to creating a justifiable typing effort model and using it to hunt for the best layout. Could I find a layout that improved on the much-lauded Colemak?

Carpalx is a Perl script which reads in model parameters and performs a stochastic simulation to find a layout that minimizes the effort score for a given set of model parameters.

Statistics vs Human Factors

The statistics that Carpalx uses attempt to capture the essential human factors of typing. Fundamental considerations like finger travel distance and symmetric hand use can easily be agreed upon. More nuanced ones, like finger rolling and curling vs extending are harder to pin down — but extremely important. It's realtively easy to improve on QWERTY. It's much harder to refine a layout that already achieves all the fundamental improvements. already good layout.

The Workman layout incorporates advanced human factors and discusses their application to Dvorak and Colemak.

In recent conversation with Stephen O'Connor (Sep 2011), who has analyzed the Workman layout, I've been persuaded to seriously reconsider the parameters in my effort model. In particular, I do not consider that the index, middle and ring fingers have different prefered motions, for a given travel distance. For example, most will agree that the ring finger prefers to extend for the W rather than curl to the equidistant X. On the other hand, the index finger has easier access to V than R.

Learning About Carpalx

There is a lot of content here, spread across many pages. I suggest reading pages in the following order

methods

layout evaluation

layout optimization

component optimization

running carpalx

Methods Behind Carpalx

I used existing keyboard layouts such as QWERTY, Dvorak, Colemak, Arensito and others, to help generate a model of typing effort. By evaluating these layouts using candidate models, I could determine whether the models were.

For example, it's widely known that Colemak is easier to type on than QWERTY and I made it a requirement that any model would corroborate this (obviously). Moreover, I built into the model certain layout characteristics that were universally seen as advantageous. While some layout characteristics remain disputed (e.g. how frequently should the pinky be used?), others such as reducing finger travel distance (by increasing use of home row), reducing same-finger row jumps and reducing repeated finger alternation on the same-hand hand can be agreed upon. These and other features form a list of beneficial layout characteristics.

Carpalx uses a parametrized model to account for finger distance, hand/row/finger penalties and stroke path penalties to accomodate different habits of typists. Those with disadvantaged fingers (hurt or missing) or hands (hurt or missing; a missing hand is ultimately debilitating unless you use a one-handed keyboard). Carpalx uses simulated annealing, a type of Monte Carlo optimization, to discover a keyboard layout for which the effort of typing the input documents is low.

Some of the desired improvements that can be directly influenced by the model during layout optimization in carpalx include

  • increasing hand-alternation or at least hand-balancing
  • reduction in same-finger typing
  • improve finger flow, such as finger rolling
  • increasing use of stronger typing fingers and reducing use of the pinky
  • limiting difficult stroke paths during typing, such as upward row progressions (e.g. nse)

Over time, the model evolved to be measure the extent of desired (and undesired) properties by three distinct effort components: base effort, penalties and stroke path. These components make up the total typing effort and evaluate a layout. For example, the comfortable key stroke combinations (e.g. 'afj' is a nice rolling motion, while 'but' is not, and 'omy' is very uncomfortable) are measured using the stroke path.

Figure 2 | The QGMLWB keyboard layout. This is one of the optimized layout for typing English text. Using several classic novels as a training set and balanced typing model parameters, minimization of typing effort was done by allowing letter keys to be relocated. This layout destroys QWERTY and improves effort over Colemak by 5%.

Carpalx was designed to investigate better layout for English text. Therefore, it does not support independent migration of a key's shift states. Carpalx currently understands one shift state (for capitalization) but the lower case and upper case characters are always bound to the same key. Identifying optimal layouts for languages that make use of diacriticals (è é ë etc) by allowing both character and diacritical keys to migrate independently is not currently possible.

Ranking Words

Carpalx uses a series of statistics to characterize a layout's performance. While quantitative and therefore directly comparable, these values can be hard to interpret and translate to typing in practise.

To give a more subjective impression of a layout's fitness, I have, in addition, ranked words based on the effort (per unit length) required to type them. I have ranked words for QWERTY, Dvorak, Colemak, QGMLWY (fully optimized, Colemak-like), TNWMLC (worst layout for English).

Some of the words are tabulated below. Keep in mind that word effort was calculated here per unit length, and is therefore not proportional to the length of the word.

layout words, by ease of typing
easiest average hardest
QWERTY alleges, fiddle, jiffle, kiddie ingent, limnery, pignorative, sumphishly pazazz, pizzazz, poppas, razzer
Dvorak condensity, equation, ethion, theist defile, fiddleys, suborder, unenviable allvar, lazars, plazas, razzly
Colemak desiring, sentry, steeps, stints implete, leafgirl, mythify, odours cazzie, pazazz, pizzazz, razzle
QGMLWY anneals, arbitrator, attend, neatly besigh, incursive, lauder, sparing buzzwig, fizzle, puzzle, zyzzyva
TNWMLC bedbug, culmed, jazzed, knocking, wizzen bunglesome, flouting, grunewald, miltier hetter, sheeter, teeter

Benefits of a New Layout

I'm neither the first nor last person to search for a better keyboard layout. Consider the Dvorak, Colemak, Arensito, or Capewell layouts.

If you spend a great deal of your time typing QWERTY and experience pain and discomfort due to the repetitive nature of the task, consider using one of these alternate layouts, such as Colemak or one of the fully optimized layouts presented here. A new layout will

  • immediately and significantly slow down your typing, giving your fingers and wrist some much needed rest
  • the accompanying frustration in learning the new layout will make you take more frequent breaks from typing, thereby giving your fingers and wrist even more of the much needed rest

Then, as you gain experience with the new layout, it will

  • reduce the effort of productive typing, for documents within your specific domain (you train carpalx using a learning set), and
  • ensure that nobody else uses your keyboard

If your goal is to achieve the last point immediately, consider using carpalx in conjunction with Das Keyboard.

You Must Be Joking

If all this sounds like an informercial, it is only because I am taking the subject of switching keyboard layouts with a modicum of skepticism and am allowing myself a certain license to parody my own process.

Only a small minority of typists use a non-standard layout. Here, by standard layout, I mean whatever layout is found in the closest internet cafe near you. In North America, QWERTY is the standard and very few people type on a different layout.

Realistically, we are very unlikely to switch layouts from whatever the local standard is (I argue here that the local standard should be changed). It's simply too hard to re-train — kudos to those who have done it!

I am under no delusion that anyone will read the contents of these pages and immediately run home to scrape off key markings on their standard layout and remap their keys to another layout, or some of the new layouts described here. Of course, if you were to do this I would recommend the partially optimized QWKRFY layout which achieves a significant typing effort reduction with only 5 keys swaps (for English text). I make some practical suggestions of how to go about doing this below.

International Layouts

Carpalx can work with any language. The input text can be a spoken language a programming language, or any set of characters that is typed.

The current limitation of carpalx in how alternate shift states for a key are handled. At the moment, each key has two shift states (two characters that it can represent). With the QWERTY these shift states represent lower/uppercase, digit/punctuation or punctuation/punctuation. The two shift states always travel together on a key. For example, ; and : are always assigned the same key, whatever its final location on the keyboard might be. Therefore, the location of shift state characters cannot be optimized independently.

Languages that have a lot of diacritical marks, extra characters are accessed using AltGr key on international keyboards. These special characters represent the 3rd, or higher, shift state on a key. In order for carpalx to meaningfully interpret and optimize shift states, further work on the code is required.

My own experience is limited to typing English. I would like to hear from international users who are interested in applying Carpalx to their languages. Should shift state characters be allowed to migrate independently of the characters that are accessed directly? What are your opinions about how the effort model should be adjusted to describe typing states (e.g. shift + altgr)?

Typing Tools - Facilitating Migration to a New Layout

windows - portable keyboard layout (PKL)

If you are using Windows, I suggest you download and install Portable Keyboard Layout (PKL). This is a small, self-contained application that allows you to change keyboard layouts on the fly. Bring it with you on a USB key, for example, to have access to your layouts at all times.