Author Topic: Evaluating keyboard layouts with word-based metrics  (Read 13157 times)

0 Members and 1 Guest are viewing this topic.

Offline iandoug

  • Thread Starter
  • Posts: 95
Evaluating keyboard layouts with word-based metrics
« on: Wed, 06 December 2017, 12:10:04 »
Hi

Current methods for evaluating keyboard layouts are usually based on analyzing what the fingers do.

But way back when Maltron arrived, they used a different metric: how many words you could type on their home row, compared to QWERTY or Dvorak.

So I've written some programs to do that sort of analysis, for the following categories:

1. home keys (because 'home row' is not always in a straight row, these days)
2. home block (see definition on site)
3. easy block (ditto)
4. one-handed words (where a low score is desirable).

Over 300 layouts analyzed.

Follow links here: http://www.keyboard-design.com/best-layouts.html

Comments and critiques welcome. Also if you think there are bugs or methodological (is that a word?) errors in my programs :-).

Cheers, Ian

Offline AMongoose

  • happy workman user
  • Posts: 220
Re: Evaluating keyboard layouts with word-based metrics
« Reply #1 on: Thu, 07 December 2017, 05:18:29 »
Great work!
I would ask for a version where we can change the word list to cater for non-english users and programing languages but that would be too much... eheheheh

One question is why do you have the "Easy Block" on ANSI for the left hand be:
W | E
S | D | F
V

instead of:
W | E
S | D | F
C

Offline iandoug

  • Thread Starter
  • Posts: 95
Re: Evaluating keyboard layouts with word-based metrics
« Reply #2 on: Thu, 07 December 2017, 16:08:20 »
One question is why do you have the "Easy Block" on ANSI for the left hand be:
W | E
S | D | F
V

instead of:
W | E
S | D | F
C

V is on index… c is on middle.
« Last Edit: Fri, 08 December 2017, 04:23:45 by iandoug »

Offline AMongoose

  • happy workman user
  • Posts: 220
Re: Evaluating keyboard layouts with word-based metrics
« Reply #3 on: Fri, 08 December 2017, 04:19:28 »
You're right, I just find C so more easily reachable by the index than V that I forgot that.

Offline iandoug

  • Thread Starter
  • Posts: 95
Re: Evaluating keyboard layouts with word-based metrics
« Reply #4 on: Fri, 08 December 2017, 04:37:52 »
Great work!
I would ask for a version where we can change the word list to cater for non-english users and programing languages but that would be too much... eheheheh

Yes, I've heard rumours that other languages apart from English exist....

On a practical side, there are several issues...
1. which languages? Mandarin, Hindi, Arabic, French, Spanish? (most spoken).
2. are there good word lists available for these languages?
3. are there lots of different keyboard layouts for these languages?

I would be completely out of my depth working with Mandarin, Hindi or Arabic. French, Spanish and German I can handle, but AFAIK there are basically two or three different layouts for French, maybe three for German, and maybe three for Spanish if we include the old defunct official Portuguese one.

It looks like "alternate keyboard layout" is very much a western thing (English, French and German, with a smattering of Nordic). I think the Easterns' problem is much different, they need something very different to anything looking like ANSI 104.

The comparisons I did were done in batch, it takes quite a while to run through hundreds of thousands of words for over 300 layouts.

I suppose it is possible to build an interactive version where you upload a layout, specify a language, and get some scores. But the layout would need to be in KLA json format, preferably.

Den's current version of KLA does something along those lines already (based on your input text rather than long word lists):
http://shenafu.com/code/keyboard/klatest/#/main

See the "words" tab on the results page.

Offline AMongoose

  • happy workman user
  • Posts: 220
Re: Evaluating keyboard layouts with word-based metrics
« Reply #5 on: Fri, 08 December 2017, 09:43:40 »
What ''old defunct official Portuguese one."? How old are we talking? I remember typewriters where mostly azerty and we now use a pretty standard localized ISO qwerty with dead keys and a ç.

Offline iandoug

  • Thread Starter
  • Posts: 95
Re: Evaluating keyboard layouts with word-based metrics
« Reply #6 on: Fri, 08 December 2017, 09:48:16 »
What ''old defunct official Portuguese one."? How old are we talking? I remember typewriters where mostly azerty and we now use a pretty standard localized ISO qwerty with dead keys and a ç.

1937 :-)

https://en.wikipedia.org/wiki/HCESAR

Offline AMongoose

  • happy workman user
  • Posts: 220
Re: Evaluating keyboard layouts with word-based metrics
« Reply #7 on: Fri, 08 December 2017, 11:46:37 »
Heck that's pretty nifty, I remember seeing a very old typewriter with a H as first letter and wondering what was up with that, ONCE. I guess stuff from the old regime got shut down in the 70's.

Now i really want to compare it to pt-nativo http://xahlee.info/kbd/pt-nativo_keyboard_layout.html (which was intended for brazilian portuguese).

Also these can't be used in "spanish", they lack the "~" on the "n" and the inverted "?" and "!" and more importantly the "¨".
And they talk a completely different language in each part of spain just to further complicate things.

Offline iandoug

  • Thread Starter
  • Posts: 95
Re: Evaluating keyboard layouts with word-based metrics
« Reply #8 on: Fri, 08 December 2017, 14:39:52 »
Now i really want to compare it to pt-nativo http://xahlee.info/kbd/pt-nativo_keyboard_layout.html (which was intended for brazilian portuguese).

Curious layout ... why would the Brazilians need German, Danish and Old English letters?  (and I think slash-l is Eastern European?) Or are those just Nice to Have?

Also these can't be used in "spanish", they lack the "~" on the "n" and the inverted "?" and "!" and more importantly the "¨".

Yeah was wondering after I co-mingled Spanish and Portuguese together if I was talking sense ... we used to use Portuguese spelling for a few places down here (Moçambique etc..) and we still have people giving their children names like François, but never seen much in the way of ñ or ¿.

[Aside: the Afrikaans community here has roots in Dutch, French Hugenout and some Portuguese ... and love to give their children names with diacritics (Ánel, Riëtte, etc ... there's one with an acute and gravè accent in which I can't remember now). Which are easy to write but a pain when it comes to keyboards and data capture, since we use standard USA ANSI keyboards .... situation was worse before UTF-8 arrived. Different font, see a mess...]



Offline Snarfangel

  • Posts: 288
Re: Evaluating keyboard layouts with word-based metrics
« Reply #9 on: Sun, 10 December 2017, 12:00:23 »
My version [Y RINA QUO] did pretty well in English. I cranked up the value of rolls, too, which tends to decrease alternation of hands.

I've been using it for a little over a year. I really like it. YMMV.

Offline iandoug

  • Thread Starter
  • Posts: 95
Re: Evaluating keyboard layouts with word-based metrics
« Reply #10 on: Sun, 10 December 2017, 13:25:33 »
My version [Y RINA QUO] did pretty well in English. I cranked up the value of rolls, too, which tends to decrease alternation of hands.

I've been using it for a little over a year. I really like it. YMMV.

Yes, I have it in my panel for testing... :-)
Page about it is here: http://www.keyboard-design.com/letterlayout.html?layout=yrinaquo.en.ergodox

I have done another batch of tests (including your layout) using Den's revised scoring, about to repeat the process using Patrick's original scoring, and then for the third time using Den's current "we don't need no stinkin' pinkies" version... Hope to have the first set of results live in next few days.

Cheers, Ian

Offline AMongoose

  • happy workman user
  • Posts: 220
Re: Evaluating keyboard layouts with word-based metrics
« Reply #11 on: Mon, 11 December 2017, 06:20:49 »
Curious layout ... why would the Brazilians need German, Danish and Old English letters?  (and I think slash-l is Eastern European?) Or are those just Nice to Have?

No idea, probably also for the random german name. But i think the AltGr layer was more of a "cram everything" type thing.

Yeah was wondering after I co-mingled Spanish and Portuguese together if I was talking sense ...

Yes, that would be bad to do, don't do that. :p


On another note, how would you "optimize" for more than one language?

Offline iandoug

  • Thread Starter
  • Posts: 95
Re: Evaluating keyboard layouts with word-based metrics
« Reply #12 on: Mon, 11 December 2017, 13:04:00 »
On another note, how would you "optimize" for more than one language?

I don't think you can... on another thread here I was helping optimise the eNNe layout, meant to be for Dutch and English. It's better at Dutch than English, and rather good at English too. But don't think it can be best at both.

The letter use per language is just too different... for example, we speak Afrikaans down here, which is derived from Dutch. But we use "y" where Dutch uses "ij", and they use "ch" where Afrikaans uses "k". Etc. So even similar languages won't have same layout, as you pointed out for Spanish and Portuguese.

Offline AMongoose

  • happy workman user
  • Posts: 220
Re: Evaluating keyboard layouts with word-based metrics
« Reply #13 on: Mon, 11 December 2017, 13:19:24 »
Yes, I wasn't talking about THE BEST for both, but I understand even defining a middle point would be quite difficult.

I would like to be able to optimize for one with the constraint of a second one, such as that the second language scores at least somewhere in the middle of the scale and no common sequences are hard. Should take a look at that eNNe thread. I've been using workman as I type mostly in english but the portuguese situation is not the best, I should invest some time on this.

Offline iandoug

  • Thread Starter
  • Posts: 95
Re: Evaluating keyboard layouts with word-based metrics
« Reply #14 on: Wed, 13 December 2017, 00:59:14 »
On another note, how would you "optimize" for more than one language?

The letter use per language is just too different... for example, we speak Afrikaans down here, which is derived from Dutch. But we use "y" where Dutch uses "ij", and they use "ch" where Afrikaans uses "k". Etc. So even similar languages won't have same layout, as you pointed out for Spanish and Portuguese.

Contrawise, we (Den and I) have noticed that when a layout does well at English (and typically programming too, depending on where the punctuation is), you can throw just about anything at it that uses standard Roman letters (no diacritics etc) and it will do well.. eg two samples like this:

Code: [Select]
Adjuvilo

Patro nosa, qua estan en cielos,
santa esten tua nomo, advenen tua regno,
esten tua volo, quale en cielos,
tale anke sur la tero;
nosa panon omnadaga donen a nos hodie;
nosas ofendos pardonen a nos,
quale nos pardonan a nosas ofendantos
e ne lasen nos fali en tento,
ma liberifen nos de malbono.

Afrikaans

Onse Vader wat in die hemele is,
laat u naam geheilig word.
Laat u koninkryk kom,
laat u wil geskied,
soos in die hemel net so ook op die aarde.
Gee ons vandag ons daaglikse brood,
en vergeef ons ons skulde,
soos ons ook ons skuldenaars vergewe.
En lei ons nie in versoeking nie,
maar verlos ons van die bose.
Want aan U behoort die koninkryk en die krag
en die heerlikheid tot in ewigheid.
Amen.

Aramaic

Abbun d'bishmayya
yitqadesh shmakh
titey malkhutakh
tihey re`utakh
heykhma debishmayya
keyn af be''ar`a
lachman deme'ar`a
hab lan yoma deyn umachra
ushbaq lan chobayn
heykhma de'af shebaqnan lechayyabayn
we'al ta`eylan lenisayuna
ela atseylan min bisha

or

Code: [Select]
isiXhosa

Nkosi, sikelel' iAfrika;
Malupakam'upondo lwayo;
Yiva imitandazo yetu
Usisikelele.

Chorus

Yihla Moya, Yihla Moya,
Yihla Moya Oyingcwele

Sikelela iNkosi zetu;
Zimkumbule umDali wazo;
Zimoyike zezimhlouele,
Azisikelele.

Sikelel' amadol' esizwe,
Sikelela kwa nomlisela
Ulitwal'ilizwe ngomonde,
Uwusikilele.

Sikelel'amakosikazi;
Nawo onk'amanenekazi;
Pakamisa wonk'umtinjana
Uwusikilele.

Sikelela abafundisi
Bemvaba zonke zelilizwe;
Ubatwese ngoMoya Wako
Ubasikelele.

Sikelel'ulimo nemfuyo;
Gxota zonk'indlala nezifo;
Zalisa ilizwe ngempilo
Ulisikelele

Sikelel'amalinga etu
Awomanyana nokuzaka,
Awemfundo nemvisiswano
Uwasikelele.

Nkosi Sikelel' iAfrika; 
Cima bonk' ubugwenxa bayo
Nezigqito, nezono zayo
Uyisikelele.

Offline stevep

  • Posts: 36
    • Colemak Mod-DH
Re: Evaluating keyboard layouts with word-based metrics
« Reply #15 on: Fri, 15 December 2017, 11:12:25 »
Regarding traditional staggered layouts, I think your concept of the "Home block" falls into the classic trap of assuming the default fingering, despite in reality the (qwerty) C key position being far easier with the index finger. It would be good if you considered the angle mod in your model, which takes into account this concept.

You could take a look at the results from the Mod-DH scoring system, which is mainly finger-based but also considers same-finger bigrams. You could compare your results with the web-based analyzer.

« Last Edit: Fri, 15 December 2017, 11:21:20 by stevep »

Offline iandoug

  • Thread Starter
  • Posts: 95
Re: Evaluating keyboard layouts with word-based metrics
« Reply #16 on: Fri, 15 December 2017, 14:10:14 »
Regarding traditional staggered layouts, I think your concept of the "Home block" falls into the classic trap of assuming the default fingering, despite in reality the (qwerty) C key position being far easier with the index finger. It would be good if you considered the angle mod in your model, which takes into account this concept.

You could take a look at the results from the Mod-DH scoring system, which is mainly finger-based but also considers same-finger bigrams. You could compare your results with the web-based analyzer.

Actually the "home block" concept is Den's idea, not mine.

We don't like ANSI/ISO, and prefer the keys in straight lines...

IMHO trying to make a good layout on ANSI/ISO is like putting lipstick on a pig. The form factor is just wrong (someone on Den's forum described is as "designed for two right hands", and I agree) ... and things like angle mod are (IMHO) a desperate attempt to fix a bad design instead of dumping ANSI/ISO and starting with something designed for humans rather than as a mechanical kludge from 100 years ago.

Yes I know they are standards. The standards bodies screwed up big time.

</rant>

But I take your point. :-)
Problem is I'm comparing multiple different layouts, with different design ideas. Even QWERTY was invented before the "home row" (let alone touch typing) was invented. QWERTY was designed for 2 or 4 finger typing ... and "home" was most likely ER and IO ... then when you needed A, you found S right under your index finger. The real problem child is N... the should maybe have rotated Y, U, and N.

But I digress :-)
There are other layouts in the mix that put the home keys in other places. To cater for all of these, the "home block" was defined as the three keys under index, middle and ring, plus thumb, plus the 12 keys directly above and below (using conventional assignment) the index, middle and ring "home".

If you like we could maybe define something like "Angle mod Home Block" and see how that compares.... it's only going to make a difference on ANSI/ISO, the ortholinear styles won't change, I don't think.

Will see if I can post some results later... I think it's just a matter of changing a few lines of code.

Just so I'm clear, the only real change is to the left hand, where on QWERTY we put ZXC on ring/middle/index instead of XCV? And then index gets one extra key to handle?

Thanks, Ian

Offline iandoug

  • Thread Starter
  • Posts: 95
Re: Evaluating keyboard layouts with word-based metrics
« Reply #17 on: Fri, 15 December 2017, 16:01:22 »
Here you go:

http://www.keyboard-design.com/angle-mod-home-block-words.html

Summary for the impatient:

Code: [Select]
Angle mod homeblock:
colemak.en.ansi wfpluyrstneizxcm 13124 19 structurelessnesses

normal homeblock:
colemak.en.ansi wfpluyrstneixcvm 14562 19 structurelessnesses

For comparison, this layout below does well on Patrick's KLA, for ANSI:

Angle mod homeblock:
embizone.en.ansi lLdDfFoOyYnNsStTaAeEiIzxcqQjJ 17141 20 existentialistically

normal homeblock:
embizone.en.ansi lLdDfFoOyYnNsStTaAeEiIxcvqQjJ 19404 20 conventionalisations

I found the layout here on Geekhack: https://geekhack.org/index.php?topic=89827.0
Page about it is here: http://www.keyboard-design.com/letterlayout.html?layout=embizone.en.ansi

I mention it because it maintains ZXCV. But does some other Dvorak-like things too. Seems to work for KLA.

Mm that's curious ... Colemak did not include caps, but Embizone does ... hope it's not a bug in programs. Will investigate.

Cheers, Ian




Offline stevep

  • Posts: 36
    • Colemak Mod-DH
Re: Evaluating keyboard layouts with word-based metrics
« Reply #18 on: Sat, 16 December 2017, 06:36:20 »
Thanks for taking a look at the angle mod and producing those extra results!

I realize this is a tricky topic because the horrible mess of 150 years of bad keyboard design. Yes, you are right in that "home block" moves over to cover the (qwerty) keys ZXC instead of XCV. Obviously this means hitting these physical keys with different fingers than the "traditional" method. The problem with this though, is it messes up things if you use a modern layout like Colemak, which has been designed to avoid same-finger bigrams. The solution is that the users of the "Angle Mod" move their left-hand bottom keys one space to the left, which means they're still typed with the same finger as before, but just using a more comfortable, near-symmetric technique. This results in the "home block" reverting back to containing XCV (for users of default Colemak/Qwerty), but using a comfortable technique - which scoring systems often fail to account for.

What I like about the "home block" concept, is it recognises that it's easier for the fingers to move up and down to the top/bottom rows, rather than the whole handing moving laterally to reach the centre-column (e.g. Qwerty G and H). This is why, in Colemak Mod-DH, you end up with D and H in your home block, at a cost of losing V and M. This is better since D/H are much more frequent. It would be interesting to see what results you get for that! I'm not convinced about including the ring finger top/bottom keys though, to me that's quite a weak finger.

Yes, the Angle Mod it is a bit of a kludge to deal with the poor design of ANSI/ISO, but actually, it does fix most of the problem with the stagger. The middle and bottom rows are basically fixed, and become comfortably symmetrically staggered. The hands naturally come at the keyboard obliquely, so what is ideal would be either symmetrically staggered board, or a split-matrix board where you could angle the two halves separately.

The main remaining annoyance that the angle mod can't solve is the offset to the top row, but at least this is only ¼ key and so bearable. If it is a pig with lipstick on, then it is a very attractive pig!  :eek:

« Last Edit: Sat, 16 December 2017, 06:45:14 by stevep »

Offline iandoug

  • Thread Starter
  • Posts: 95
Re: Evaluating keyboard layouts with word-based metrics
« Reply #19 on: Sat, 16 December 2017, 13:33:26 »
Thanks for taking a look at the angle mod and producing those extra results!

The main remaining annoyance that the angle mod can't solve is the offset to the top row, but at least this is only ¼ key and so bearable.

Programs did have some bugs as suspected above, fixed, but also busy with other changes so corrected data should be up in next day or so.

I saw a proposal a while back for getting rid of the "two right hands" design... was a multi-year plan in which the keyboard manufacturers move the top row (or bottom row, can't remember) more in line with the home row. If it was top row, then ¼ key to the right, and if bottom row, ¼ key to the left.

Then they give the world a few years to adjust to that. At some point, they all conspire to move things another ¼ key, at which point two rows will be aligned. Then wait some more years, before slotting final alignment.

I hope that while they are fiddling, they make the space bar shorter (so less stabilisation needed, and can use lower weight switch... yes I live in hopes), and move the Alt keys more under the thumbs...

They might as well switch to split ergo-style while they're at it... :-)


Offline etatauri

  • Posts: 19
  • Location: California, USA
Re: Evaluating keyboard layouts with word-based metrics
« Reply #20 on: Fri, 06 April 2018, 19:12:38 »
Very interesting topic. I myself have switched to Colemak layout a bit over a year ago and with training, I am not able to type around 70 wpm on average.

What I find so great about this layout is that there are so many words you can type just using the home row. I think its great that people are continuously researching better ways to type, but for the time being, I think Colemak is the quick and dirty way to go. Its easy to transition from Qwerty, and it keeps common shortcuts like cut and paste in the original positions.

I think the only thing I don't like about Colemak is the 'sc' combo, like school, crescent, scrub.. these words are really uncomfortable, but it didn't occur to me before reading this post that you could use the index finger to reach the C.
Input Club K-Type / Vortex Pok3r / Magicforce 21 / Razor Blackwidow
MX Clear / MX Blue / IC Halo Clear / NK Box Pale Blue / NK Box Navy
SP DSA HC Dolch / SP Dye Sub DSA / SP SA Dasher / MD MT3 /dev/tty / KC Strong Spirit

Offline Snarfangel

  • Posts: 288
Re: Evaluating keyboard layouts with word-based metrics
« Reply #21 on: Tue, 24 April 2018, 15:12:05 »
This subject inspired me to have another go at my keyboard layout on my Kinesis Advantage2. So here's what I came up with:
194531-0

If anyone would like the Kinesis configuration, let me know. I have it currently set to <shift><space> for backspace, but I think <shift><shift> is easier, or at least what I unconsciously try when typing. I'm attaching the Keyboard Layout Analyzer setup for it at the end. * KinesisFixed.png

The stats are really very good, especially for a layout that doesn't really use AltGr for another set of characters. Significantly better than my previous layout, anyway, and the numbers and much of the punctuation looks a lot more logically set out. Not all of the the keys are used -- you can add a full key and two shifted keys on the top right corner, I just didn't have anything I really needed (Capslock? I hardly ever use it. If I could make a generic "lock" key for caps, shift, number, AltGr, I might put it there).
« Last Edit: Tue, 24 April 2018, 15:20:07 by Snarfangel »