Ban Key Chords

Key chords is the bane of keyboarding.

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

Single key. For example: F1 , PageUp . Key chord. For example: Ctrl + c , Ctrl + Shift + z , Alt + F4 . 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 Keyboard Design Flaws]

Key chord probably 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 behavior.

Microsoft's Alt Key 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 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 banana out of the universe.

But, there isn't enough keys on keyboard. You only have 12 function keys, plus some others such as Home , End , PageUp , PageDown , arrow keys, and 20 or so keys on the number pad. But there are 10 times more commands in software. (e.g. photoshop, emacs, games, etc.) What to do?

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.)

How many possible 3-keys sequence are there? There are 26 letters in alphabet, plus 10 digits. So you have 36 key choices for a key. Let's add punctuations { . FULL STOP , COMMA ' APOSTROPHE ; SEMICOLON } to make it 40. If each of your command has 3 keys in a key sequence, counting the lead key, then you have 1 × 40 × 40 = 1600 possible keys for commands. Enough! Now, suppose one of your key sequence is CapsLock 2 1 on QWERTY layout. Now, the “21” is rather hard to type, involving little finger and pinky reaching the number row. So, if we consider also typing efficiency, how many 3-keys sequence do we have? Let say each hand can only have 12 key choices. (For example, for left hand, the available keys are just qwer asdf zxcv ) Now, two hands, so you have 24 choices per key. So, we have 1 × 24 × 24 = 576 choices. Enough. 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]

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 … 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

Key chord should be used only for commands that need to be repeated within a second (hold the key and let the command repeat). For example: moving cursor, deleting words, paging, switching tab/window.

Key chord should use no more than one modifier. This makes the key much simpler, and healthier for your hand. So, key chord such as emacs interactive replace Alt + Shift + % or Mac's redo ⌘command + Shift + z should not be allowed.

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 Linux

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

Defining Key Sequence in Emacs

Emacs also supports key sequences out of the box. For how, see: Emacs: Define Key Sequence

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

Sticky Key

For Emacs Users

For emacs, you have few choices:

xah fly keys Mode

ergoemacs-mode http://ergoemacs.github.io/

emacs evil mode (vim keys in emacs)