Ban Key Chords

By Xah Lee. Date: . Last updated: .

Key chords is the bane of keyboarding.

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

  1. Single key. For example: F1PageUp.
  2. Key chord. For example: Ctrl+cCtrl+Shift+z⌘ command+Shift+zAlt+F4.
  3. Key sequence of single keys or chords. For example, on Microsoft Windows, F10 e c for copy, or Alt+Space c to close window.

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 (1990). I remember thinking, it's strange. You have to hold ⌘ command first, then press the key c, then, release c, then, release ⌘ command. 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. Piano and Stenograph machines are like that. [see Stenotype Machine]

Whence Key Chord Came From?

Mechanical typewriter, the mother of all keyboard bane. [see Typewriters] [see Keyboard Design Flaws]

Key chord started life on the mechanical typewriter, the Shift key. The key shifts gears, so it must be held down first, then you press other keys.

When computer keyboard came, sans levers and gears, but habit stuck, and engineers invented the “modifier” keys, to emulate the typewriter gear shift.

Microsoft's Alt Key Sequence System

Now, thinking about this, i think Microsoft must be a genius, when they invented the key system on Windows around 1994, 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 graphical menu hint, 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 them.

For majority of commands, you should use a key sequence of single keys. 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 {CapsLock, ❖ Window, ⌘ command} key as your start key.)

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 F1 F2 etc keys are far away and all other single-press key such as {Home, End, , , , , etc} 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.

Turn on Sticky Keys as Key Sequence

How to Define Key Sequence in Linux

The Linux LXDE/Openbox windows manager supports key sequences out of the box. The keybinding can also be app specific.

Use Key Sequence in Emacs

How many possible 3-keys sequence are there?

There are 26 letters in alphabet, and we add 4 punctuations { FULL STOP . COMMA , APOSTROPHE ' SEMICOLON ; } , to make it 30. So you have 30 key choices for a key. If each of your command has 3 keys in a key sequence, counting the lead key, then you have 1 × 30 × 30 = 900 possible keys for commands. This is enough, because most applications has less than 900 commands.

Note: out of emacs default over 1 thousand keybinding [see A Curious Look at Emacs's One Thousand Keybindings], the number of commands that are practically used is under 300. For vast majority of emacs users, if you log their commands that are executed by a keybinding, within 1 month, i think the figure is less than 200, with perhaps 70% of them only called once.

[see How Many Keyboard Shortcuts Are There]

Keybinding and Input-System