Ban Key Chords
Key chords is the bane of keyboarding
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 • ⌘ command+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.
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
- 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. Exception: unless it's a dangerous command such as shut down, close window, then you want multiple modifier to make them hard to hit by accident.
more detail at Keyboard Shortcut Design: Repeatable vs Non-Repeatable Commands and Keys
If you survey commands in software applications, for example:
- Windows: Keyboard Shortcuts
- Second Life Keyboard Shortcuts Cheatsheet
- Emacs: One Thousand Default Keybinding
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 Emacs: One Thousand Default Keybinding〕, 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.
Keybinding and Input-System
- Why Alt Tab is Bad
- How Many Shortcuts Are There
- Emacs vs vim, Keybinding Efficiency
- vim HJKL vs IJKL
- Gamers WASD Keys
- Design of vim Mode Activation Key
- History of Key Shortcuts: Emacs, vim, WASD
- History of vi Keys
- Muscle Memory vs Mnemonics
- Ctrl ❌
Ban Key Combos - Ban Shift Key
- Function Key vs Key Chord
- Fast-repeat vs Non-fast-repeat Keys
- Modifier Keys Usage Frequency
- Keyboard Shortcut vs Launch Buttons
- Best Way to Insert Parenthesis/Brackets
- Math Input Design
- Create Math APL Keyboard Layout
- Linux Mac Windows, Which is Best for Keybinding?
- Dual-Function Keys (Home Row Mods)
- Xah Shorthand System (Abbrev Input)