Keyboard Shortcut Design
Perm url with updates: http://xahlee.org/comp/keyboard_shortcut_design.html
Keyboard Shortcut Design: Dedicated keys, Special Buttons, Extra Keys
Xah Lee, 2010-04-30, 2010-06-13, 2011-03-06, 2011-05-27
Spent few hours obsessing with key shortcut design again. Re-organizing my 100+ shortcut keys among applications, re-wrote and organized my AutoHotkey scripts, created a page of AutoHotkey example scripts: AutoHotkey Example Scripts, much time spend on thinking about the shortcut design.
For example, in a keyboard shortcut system, there are issues of global keyset, and keyset local to applications, and there are standard typing oriented keys (e.g. a b c, 1 2 3, ! @ # etc.), special function keys (e.g. F1 F2, PageUp, PageDown, etc), specialized buttons (such as those buttons and knobs of multimedia keyboards). Then, there's also several key software systems, those from OS (e.g. 【Win+e】, 【Win+l】, …), and keyboard driver (e.g. IntelliType ), and specialized macro/launch software (AutoHotkey), and some are ah-hoc from registry… the whole thing is a very complex shit. (bringing in other OSes, Mac OS X, Classic Mac, Linux, X11, makes it more complex)
Here's few thoughts from my experience i learned in recent months.
Button-Styled Keys Are a Pain
Special Buttons on Microsoft Wireless Natural Multimedia keyboard
Those special buttons on keyboards, such as those multimedia keys on The Microsoft Natural Ergonomic Keyboard 4000, are a pain in the ass to use. They lack tactile feedback.
For example, consider these tasks: ① switching to next/previous tab in a browser ② switch next/previous app ③ changing sound volume. A hotkey for these purposes, are used many times per hour, and often needs to be pressed multiple times in a few seconds. For a key that needs to be pressed frequently or repeatedly, you should not assign them to those button-styled keys.
The problem of button-styled keys are:
- Hard to locate without looking.
- Takes much more pressure to press.
- Hard to know if you pressed them successfully.
- Feels bad on your finger like ramming into concrete.
I thought of using these special buttons for application specific functions. Because they stand out as a set of special buttons. So, for example, the 5 “My Favorites” buttons in the Microsoft 4000 keyboard can have different purposes depending if i'm in a web browser, Second Life viewer, in Emacs, or in OS file manager (e.g. Windows Explorer, Mac Finder). But after a while, i discovered that this is not a good approach due to these button's hard-to-use factor. Because, if the function is frequently used, then pressing these keys is inconvenient, as compared to say F5 to F8.
Critical Principle: Frequency of Use to Ease-To-Use Keys
Another experience i gained in the past few months is that, you really want the most frequently used functionality to be at the most easy-to-use keys, even if that means breaking certain consistency.
When designing a system of what functions get mapped to which keys, one of the aspect to consider is to put the most frequently needed functionality to the most easy-to-press keys. Easy-to-press here considers key position (e.g. home row keys are easier than F keys; 【Alt+a】 is easier than 【Ctrl+a】), as well key physical type (e.g. button styled keys are bad), and also single key or key combination (a is easier than 【Ctrl+a】 or 【Ctrl+Alt+a】). For a example of this design principle, see: ErgoEmacs Keybinding.
However, there are other considerations. For example, consistency. For example, you might have all F keys for one of the following group of tasks:
- All F keys are for launching applications.
- All F keys are for global system-wide purposes.
- All F keys are application specific.
- All F keys are related to manipulating window or app (e.g. launch/switch to a app, changing window size, hide app, close window … etc.
The F keys in the above examples could be another set, such as all Alt+‹number› set, or all Alt+‹letter› keys, or keys on the numeric keypad as a set. Or, perhaps you might think that all Alt+Ctrl+‹letter› space should be for a particular family of related purposes. Or, all keys involving the Tab should be related to having some next/previous concept, such as switching to input fields or switching applications. Or, all keys involving the Shift modifier should mean reverse the functionality, such as Cmd+z for undo and Cmd+Shift+z for redo on the Mac as well in many applications in Windows and Linux. There are really quite a lot of such design approaches about key set consistency.
Consistency is important because they make the keys easier to remember.
I realized, that in my 20 years of keyboarding obsession, that you can pretty much throw all these thoughts out of the window. The above design approaches are not practical, because there are too many conflicting interests, and the other aspects are often more important.
For example, let's say you put all F keys to launch apps. However, most people only use few applications daily, not 12. So half of the F key spots would be wasted. But suppose you did put all 12 F keys to launch 12 apps. Now, what you gonna do with 【Alt+‹Fkey›】? Should it all be system wide, or they should all be app specific, or should they all be related to manipulating windows, or should they all be related to navigation? … Once you decided a consistent scheme for 【Alt+‹Fkey›】, then what about 【Alt+‹letter›】 keys? What consistency scheme can you assign to that? Then what about 【Ctrl+‹Fkey›】 set? or 【Win+‹Fkey›】 set? Then what about 2-modifier combinations? You can see that your consistency scheme can be only consistent to some artificial degree, yet making a lot sacrifise to key spots and practical uses.
Part of the reason is because that the keyboard hardware itself is lousily designed. The PC keyboard we use are evolved from typewriter machines and computers of 1960s and 1980s, and it evolved very slowly. It is nothing of a coherent design. Similarly, computer software, their interface, also evolved, but changing much faster than keyboard hardware changes. The shortcuts we have today are much result of this rather incoherent co-evolution.
I find that, given today's PC keyboard and the software applications, the most critical principle is simply to put the most frequently needed functionality to be the most easy-to-press keys. This is more important than maintaining consistency, in general.
Single Key is Much Better than Combo Keys
Also, i found, that the advantage of single key shortcut over combo keys is much significant than i thought.
I realized, you want to use single key shortcut as much as possible, than maintaining some consistency by using combo keys.
For example, say that F6 is launching the Firefox browser. I use at least 3 browsers daily, because i am a web developer. I might think, that F6 launches Firefox, and 【Ctrl+F6】 launches Microsoft's browser, and 【Alt+F6】 launches Google Chrome web browser. The idea is that the F6 is always associated with launching a browser. This keeps all the hotkeys slightly consistent and easier to remember. My experience tells me that, if these functions are needed frequently (say, even just once per 10 min on average), forget about consistency, single key hotkeys is much more convenient. (So, here it would be better to have F6, F7, F8, to launch each browser.)
The logical analysis of this experience seems to be that, some consistency in hotkey placement is important when learning the hotkey spot initially, but you need to actually press these days daily and repeatedly, for years. Once you learned, it's part of the muscle memory. Over all, it is more important that the repeated operation be convenient. This advantage beats the slight disadvantage in initial learning about where the key is.
There are quite a few examples of this. For example, i have a hotkey that allows me to switch next tabs in all different browsers. (by default, IE, Firefox, Opera, Chrome, do not all have the same hotkey for switching to next tab. It's either 【Ctrl+Tab】 or 【Ctrl+PageDown】) So, suppose i decided i want 【Alt+l】 vs F8 for this function. 【Alt+l】 (that's lowercase L) has the slight advantage that it's under home row, but 2 keys. F8 is just a single key, but with slight disadvantage that user needs to move hand a bit to reach it. Before, my thought on this is that there's no significant advantage of one over the other in general. But now i think the single key choice is definitely better. How much better the single key choice is proportional to how frequently this hotkey needs to be pressed.
Problem with Combo Keys
More than 95% hotkeys in any app in Windows or Mac or Linux are all combo keys. This is because there are only a handful of single keys (e.g. F1 F12 Ins Del Home End PageUp PageDown PrtScn ScrLk Pause, …), when these are used up, you are forced to use a combo, involving Alt Win Ctrl Shift ⌘ Cmd modifiers.
I've realized, that singe key is much more advantageous.
The problem with combo keys is that, with so many apps that we need to use today, the combo keys quickly get confusing, and very quickly becomes hard to remember, and they are much less ergonomic.
My keyboard the Microsoft ergo 4000 has 18 extra special buttons. They are all used up by me, with custom functions, and is NOT ENOUGH.
I think a scientific study can confirm this. If you survey computer users, say college educated adults so we exclude dumb old grand parents, i think you'll find that most don't know or use or care about the vast majority of combo shortcuts, except maybe a few critical ones that are frequently used.
If we were to redesign keyboard, it'd be a good design to have say 20 more function keys. So, besides 12 F keys, another 12 named G1 to G12 key, and another set H1 to H12. Common functions, such as Help, Undo, Redo, Copy, Cut, Paste, New, Open, Close, Save, Print, must all have a single dedicated key with proper labels on them. Also, several special pairs of keys for prev/next Window/Tab, and pre/next field. A dedicated key that toggles max/min window. (for such a design, see: Ultimate Xah Keyboard Layout)
Have you seen those Cash register machines at local store? They have several array of keys. I think the design of such machine makes the point. If the key needs to be used repeatedly, you'd want to have lots of dedicated keys, even if some keys may be used infrequently. You don't want key combos.
Cash Register machine. All single-keys for functions. img src
Add Dedicated Keys to Your Computer
The company fentek-ind.com sells many usb keypads that adds programable keys. One of their most popular is a X-keys strip, that is a row of 16 keys. They also sell other larger keypads that has 24, 35, 58 keys.
Fentek's X-keys Programable Key Stick. It adds 16 programable keys. (~$100) amazon
Fentek's 20-key pad. (~$120) amazon
Logitech sells a “gameboard”, that adds about 20 programable keys. For full review, see: Logitech G13 Advanced Gameboard.
Though, due to the shape of this device, it is not suitable for normal computer operation. Because, it is designed to be operated when your left hand is resting on it. Unless you are playing games, you can't have your left hand rest on this at all times. To press the key without your hand on it, the device surface is slanted in a way hard to see or use.