Banish Key Chords

, , …,

Key chords is the bane of keyboarding.

There are 3 types of key shortcuts to invoke commands in software:

of these, in terms of efficiency and hand health (Repetitive Strain Injury), the single key is the best. Key sequence of single keys is second best. Key chord is the worst.

Key chord is the most hard on hand health, but is also conceptually the most convoluted.

i remember in around 1991, when i first learned about key chord on the Macintosh Classic. I thought, it's strange. You have to hold ⌘ Cmd first, then press the key c, then, release c, then, release ⌘ Cmd. It must be in that specific order.

A more natural way is either key sequence, or real chords. Real chords, meaning, pressing several keys together but you don't have to worry about which to hold or release first. Stenograph machines are like that.

Whence Key Chord Came From?

Typewriter Hermes
mechanical typewriter, the mother and bane of all keyboard problems. 〔☛ Keyboard Hardware Design Flaws

Key chord probably started life on the mechanical typewriter, the ⇧ Shift key. The key pushes levels and shift gears, so it must be held down first, then you press other keys.

i suppose, when computer keyboard came, sans levels & gears, but habit stuck, and engineers invented the “modifier” keys, with Bucky bits, to emulate the typewriter behavior.

Now, thinking about this, i think Microsoft must be a genius, when they invented the key system on Windows, where Alt is used to invoke menu, and all command can be called by a sequence of key strokes. For example, pressing 【Alt e c】 does copy. If you press the sequence fast, menu won't show. If you press it slowly, menu shows. This is probably the best system given the PC keyboard. This system, lets you invoke any command, yet has menu counter-part, so it's easy to see a list of them and also grouped by category. (emacs supports this mechanism, and its key system is much more extensive than that.)

Now, this is real interesting. Who's the guy who designed the Microsoft Windows Alt key system?

What Should You Do with Key Chords?

BAN the fsck out of the universe.

But, there isn't enough keys on keyboard. You only have 12 function keys, plus some others such as ↖ Home, . But there are 10 times more commands in software. 〔☛ Emacs Keybinding Efficiency: Page Up/Down and Pigeon Hole Principle〕 What to do?

For majority of commands, you should use a key sequence of single keys, instead. For example, 【F10 e c】. But Function keys are harder to reach. So, you could start with a easy key such as 【▤ Menu e c】. (you can make {Caps Lock, ❖ Win, ⌘ Cmd} key as your start key, whichever key on YOUR keyboard is easy to press.)

How many possible 3-keys sequence are there?

There are 26 letters in alphabet, plus 10 digits. So you have 36 key choices for the key. Let's add 4 punctuations to make it 40. If each of your command has 3 keys in a key sequence, then you have 1 × 40 × 40 = 1600 possible keys for commands. Quite enough!

Still, some commands are not suitable for key sequence. For example, moving cursor by word. You want to be able to hold down a key and have the cursor keep moving. You can't do that with key sequences, because you need to release the key and press again to invoke the command again. Answer: use single-press key. Retort: But F keys are far away and all other single-press key such as {↖ Home, ↘ End, , , , , …} keys are already used. Answer: key chord then.

Principles of Efficient Use of Chord Keys

more detail at Keyboard Shortcut Design: Repeatable vs Non-Repeatable Commands and Keys

If you survey commands in software applications, for example:

vast majority of commands are the non-repeating type. The repeating type are less than 2.5% of commands. Using 【Ctrl+‹letter/digit›】 key give you about 36 spots. Adding 【Alt+‹letter/digit›】, you have 72 spots. And that's more than enough for repeating commands. In practice, i estimate a programer uses less than 25 repeating commands.

Defining Key Sequence in Emacs

Not many apps supports defining key sequences. Emacs does. For how, see: Emacs Keybinding Syntax Examples.

What About Using Sticky Keys to Turn Key Chord into Key Sequence?

In {Microsoft Windows, Mac, Linux}, there's a sticky key feature. When you need to press a key chord, such as 【Ctrl+x】, you can just type them separately 【Ctrl x】. That's what the sticky key feature does.

linux xfce sticky key
Linux xfce sticky key

I tried Sticky Keys feature for the handicapped, on Microsoft Windows around 2007, for just a few days. I didn't like it then, but i didn't try it long enough so my experiment isn't fair trial. From my memory, sticky Keys can make things worse, because it's a hack over key chords. When you press a sequence of keys, it has to determine whether you mean a sequence or chord (since {Microsoft Windows, Linux, emacs} all support both). The end result is that it's confusing to use, imprecise, and slows you down. But on Mac OS X, it doesn't have key sequences, so sticky key isn't ambiguous and deterministic, so it should work well (but i haven't tried).

i know some emacs people really love sticky keys. They are, at least:

addendum: i started to use sticky keys now, on Linux, in addition to all my customized keys that avoid chord.

blog comments powered by Disqus