Best layouts

31 December 2017

The best layout depends very much on what you want to use it for ...
For example:

  • The language ... natural language and computer language, if programming
  • The physical layout (ANSI, Ergo, etc) of the keyboard
  • If programming, which environment you are using, eg EMACS, Vim or a GUI, as well as which languages, and if they are wordy like COBOL or Ada, or bracket soup like Javascript.
  • Other tasks, eg data capture or specialised uses

From the above we can see that no one layout will be perfect for every use.
However we can still try to compare layouts, and use the results as a guide to picking one which is best for our needs.

There are different ways of measuring keyboard effectiveness, and each person tackling the problem takes a slightly different approach, leading to different results. It depends very much on WHAT you measure, based on WHICH inputs.

At present we are looking at two different ways of evaluation keyboard layouts:

Details and interactive interfaces into the results for these metrics are below.

We have averaged the results in two slightly different ways, as follows:

  1. By average rank
  2. By average standardised score

For the average ranking, we ranked how each layout did in each test, then got an average ranking for each layout, as follows, by adding the ranks like this:

(Patrick[English]*2 + Patrick[Programming] + Den1[English]*2 + Den1[Programming] +
Homekeys words + Homeblock words + AnglemodHomeblock words + Easyblock words + Onehanded words +
Efficiency + Homekeys bigrams + Homekey trigrams + Homekeys quadgrams + Homekeys commonwords)
/ 16

For the average standardised score, we took the best score in each test, set that at 100%, and then scaled all the other scores accordingly. We then did the same sum as above, using percentage score instead of rank.

The results are similar but different. You can interrogate them here:

These are the most important lists on this page.

Finger-based metrics

Finger-based metrics try to measure how much work your fingers do while typing, and how easy/pleasant/convenient these actions are.

For example, we could measure

  • The distance each finger travels
  • The likelihood that you will need to use the same finger twice or more in a row
  • The 'convenience' of typing certain common strings and words (e.g. "th", "and", "of", "ph", "wh", etc.)
  • The amount of work each finger has to do

These factors are also tied up in the physical layout of the keyboard, of which in recent times there have been a veritable explosion away from the standard ANSI/ISO layouts.

So we have analysed the results from some popular layout analyzers, of which only 1 set is now available, others will be added in due course. You can interrogate the database and do your own comparisons for different categories etc. on the page below.

  1. Patrick Gillespie's Keyboard Layout Analyzer (two different scoring models)
  2. ADnW's analyzer
  3. Colemak analyzer
  4. Michael Dickens' analyzer
  5. Martin Krzywinski's CarpalX analyzer

Efficiency

We can measure how efficient a given layout is. Those that are highly efficient will require less finger movement and effort.

The efficiency is calculated from the distance measured using Den's modified scoring (which includes vertical distance) on Keyboard Layout Analyzer.

For a given input text, we assume that a finger would need to move one key width (plus down and up and back) for each character in the text. So the distance is calculated as (number of characters * (19 + 4 + 4 + 19) mm). This is then compared to the actual distance measured, and turned into a percentage.

It's quite possible for a layout to achieve over 100%, especially the split-case designs and other AltGr designs which have more than one lower case letter on a key.

Best layouts by efficiency.

Word-based metrics

Many years ago, when Maltron launched their keyboard and custom letter layout, one of the selling points they used was to point out how many more words you could type on their Home Row, compared to QWERTY.

While correct, this comparison was a little disengenuous, because the concept of a Home Row, and even touch typing, did not exist when QWERTY was designed. So it was kind of like pointing out that your car has rubber tyres while your neighbour's ox wagon does not.

Be that as it may, counting words is still one way of comparing different layouts. Maltron used the Home Row, but modern layouts and physical designs have pushed the limits of where fingers go, and sometimes there is no such thing as a Home Row. So I wrote some programs to do the same sort of thing, but slightly differently.

Home Key Words The alternative to Home Row is to simply use the subset, which is Home Keys... i.e. just the keys that your fingers and thumbs rest on in the "start" position. So for QWERTY that would be asdf, space, jkl;.
We count how many words each layout can type, using just the home keys.
Home Block Words Another variant of this, proposed by Xay Voong, is the concept of Home Block. This is the home keys for index, middle, ring and thumb, as well as keys naturally above and below index, middle and ring.
Angle Mod Home Block Words The Colemak fans love their Angle Mod, so we have analysed this variant too.
Easy Block Words A more restrictive version of the Home Block is the Easy Block, proposed by myself. This is a block consisting of the keys which are easiest to type, namely home keys for index, middle, ring and thumb, as well as key naturally below index, and keys naturally above middle and ring.
One Handed Words Lastly there are words which get typed all on one hand. The classic examples for QWERTY are "stewardesses" and "minimum". For this test, a lower score is better, because otherwise there is insufficient alternation, and the fingers typically have to do gymnastics to finish the word.

Critiques of word-based metrics

There are some issues regarding using word-based metrics to compare keyboards, as opposed to finger-based metrics:

  • The tests only measure typing words. Even "space", a very common key, is not included.
  • Digits and more importantly, punctuation, are not included.
  • Many (most?) of the words used for measuring are rare and obscure and simply not used much in daily life. For example: acanthocephalan, acequia, antepenultimate, anthozoan, dahabeeyah, euouae, feoffee, impundulu, piwakawaka, surucucus, tediosities.
  • A lot depends on which words list you use ... I started with the Scrabble word list, then a Unix words list, before settling on a compiled list from aspell.net, which includes abbreviations/acronyms as well as very many obscure words, and some very long words.
  • The metric only measures the ability to type the word, not how easy or pleasant the typing is.

Bigrams, trigrams, quadgrams and commons words on home keys

The following are weighted analyses of typing bigrams, trigrams, quadgrams and common words, on the home keys.

Methodology: Each finger is numbered from 1 to 5, from thumb to pinky. This is basically in order of strength and flexibility, and is not entirely accurate because the ratios are not correct, but since they will be evaluated against other layouts in the same way, it should all come out in the wash.

Then we see if the required text can be typed on the home keys, and if so, with which fingers. Let us assume we want to type "th", and both letters are on the home keys, with t on an index finger, and e on a middle finger.

So we do a sum as follows: 6 - (finger1 + finger2)/2, which in this case is 6 - (2 + 3)/2, = 6 - 5/2 = 3.5. Then this figure is multiplied by the frequency of the text in English (3.882543 for th), so that more common texts count for more than less common texts.

If the text can not be typed on the home keys, it gets a score of zero. Then we add up all these scores, and finally rank the layouts according to their scores, where higher is better, as it means the texts are typed on stronger fingers.

For layouts where two fingers are needed for a letter, we add the weights of both fingers, but still only divide the sum by 2. So layouts that have common letters on AltGr level, for example, get punished by this. They might even get a negative score for some letter pairs.

We use the 20 most common bigrams, trigrams and quadgrams, and the 30 most common words.

Home Key Bigramsth he in er an re nd on en at ou ed ha to or it is hi es ng
Home Key Trigramsthe and ing her hat his tha ere for ent ion ter was you ith ver all wit thi tio
Home Key Quadgramsthat ther with tion here ould ight have hich whic this thin they atio ever from ough were hing ment
Home Key Common wordsthe of and to a in is for that was on with he it as at his by be from are this I but have an has not they or

There is some overlap between the bi/tri/quads and common words, but the frequency multipliers are different.

Same finger bigrams

This is a weighted analysis of same-finger usage.

The probability that a letter will follow another given letter is used to evaluate layouts by which letters pairs are on the same fingers. We multiply this figure by the percentage frequency of the first letter, in English.
We add the probabilities in both directions, for example "er" and "re".

There are some exceptions: We only look at lower case, and if the second letter is on the same key as the first, we ignore that pair.

The idea is to see how much a finger has to fly around, and if the two letters are on the same key (as in the split-case layouts) then it doesn't have to fly between them.

The metric does not measure how far the finger has to fly, just that it has to.
I'll look at adding distance, row jumps, inward rolls, outward rolls, to this metric if possible.

Same finger bigrams