67

I'm designing a complex product to be used in a professional setting, and I'd like to create keyboard shortcuts to the various functions. Are there any guidelines to help me decide when should I use each of the PC modifier keys?

  • 34
    @nigel222 There is nothing civilised in searching for the mouse, clicking and repositioning your hand on the keyboard. It's only annoying. – ohno Mar 8 '17 at 13:43
  • 14
    @nigel222 How lucky that this domain is not based on personal prejudices then :). – Vitaly Mijiritsky Mar 8 '17 at 17:46
  • 9
    @nigel222 This makes no sense. You don't have to use keyboard shortcuts, and for any GUI app, there's always a way to do the same thing using the mouse. So what's your problem with them? – Apologize and reinstate Monica Mar 8 '17 at 18:20
  • 9
    If you have that much of a problem accidentally hitting the keyboard, just unplug it :). But seriously, keyboard shortcuts are absolutely necessary for many users (especially those of us that have been using computers since before there were mice). – 17 of 26 Mar 8 '17 at 18:59
  • 8
    I've had the opposite problem with randomly firing off mouse gestures while fidgeting with the mouse. – dan04 Mar 8 '17 at 20:49
82

The Microsoft's Guidelines for Keyboard User Interface Design says:

Use the following guidelines for designing shortcut keys:

  • Assign simple and consistent key combinations.
  • Make shortcut keys customizable.
  • Use a shortcut with the CTRL key for actions that represent a large-scale effect, such as CTRL+S for save current document.
  • Use the SHIFT+ key combination for actions that extend or complement the actions of the standard shortcut key. For example, the ALT+TAB shortcut key displays the primary window of a running application. Alternatively, the SHIFT+ALT+TAB key combination allows you to navigate backward through currently running applications that have been previously accessed.
  • Use the SPACEBAR key as the default action of a control, such as for pressing a button control or toggling the status of a check box control. This is similar to clicking the left or primary mouse button.
  • Use the ENTER key for the default action of a dialog box, if available.
  • Use the ESC key to stop or cancel an operation.
  • Avoid modified or case-sensitive letters for shortcuts.
  • Avoid using the following characters for shortcut keys: @ {} [] \ ~ | ^ ' < >
  • Avoid ALT+ letter combinations because they may conflict with access keys. In addition, the system uses many specific key combinations for specialized input; for example, ALT+~ invokes an input editor for the Japanese language.
  • Avoid CTRL+ALT combinations because the system interprets this combination in some language versions as an ALTGR key, which generates alphanumeric characters.*
  • Avoid assigning combinations that are reserved or defined by the system or are commonly used by other applications.
  • Do not use the Windows logo key as a modifier key for non-system-level functions.

Thanks @Kristiyan

macOS Human Interface Guidelines for Keyboard Shortcuts

Always respect the system-reserved keyboard shortcuts in your app so that users aren’t confused when the shortcuts they know work differently in your app.

  • Avoid creating a shortcut by adding a modifier key to an existing shortcut, unless the shortcuts are related.

  • As much as possible, use the Command key as the main modifier key in a keyboard shortcut.

  • Use the Option key sparingly.

  • As much as possible, avoid using the Control key.

  • List multiple modifier keys in the correct order.

  • Identify a key with two characters by the lower character, unless Shift is part of the shortcut.

  • 7
    Don't forget Mac OS. – Ken Mohnkern Mar 7 '17 at 14:02
  • 4
    +1 for "Avoid assigning combinations that are reserved or defined by the system or are commonly used by other applications." – keuleJ Mar 7 '17 at 20:50
  • 6
    +1 for not forgetting MacOS. – Harper - Reinstate Monica Mar 7 '17 at 21:41
  • 2
    Cue CLion, where ALT is used in a lot of default short-cuts, which are unusable because intercepted by the OS/Desktop... (example: with a Gnome Desktop ALT+F7 grabs the window so you can move it). – Matthieu M. Mar 8 '17 at 10:37
  • 3
    Blender too, for pretty much taking over all of the keyboard except task switching. Do note that on windows at least, you don't create alt shrotcuts per se, you do set up your menus with accelerator keys that create de facto shrotcuts. Also please do your best to keep those shortcuts unique, it's no end of annoying to hit ALT, I, C and have it merely select &Crop or &Color Management because it's not sure which you meant. (Doubly so if submenus are involved.) – StarWeaver Mar 8 '17 at 11:13
30

The UI guidelines are a great start - but are also just that - guidelines. You need to do your research as well.

  1. Standards: Research what are accepted standards. e.g. Ctrl+S for Save.

  2. Familiarity: Research what is being done in similar, competitor, or otherwise comparable applications that your target audience is using.

  3. Multitasking: Research what is being done in other applications that your target audience may be using frequently alongside your product. It can be constantly frustrating when you have to continually remember that Ctrl+D deletes something in one application but duplicates something in another.

This will get you to some starting point - a researched evidence-based starting point.

  • Association: Next you may be able to pair up corresponding actions. e.g. if two actions are to be performed in succession and one is Ctrl+D, it will be easier for the user if they don't have to switch modifier all the time. Ctrl+D and Ctrl+F is way easier than Ctrl+D and then Ctrl+Alt+F.

  • Compromise: For complex applications you will have to compromise - you can't make everything a higher priority Ctrl action, and Ctrl+G can only do one thing, so if you have lots of G-actions, the shortcuts are going to be less memorable than 'first letter' associations.

  • Choose your next shortcut wisely Mister Bond. Choosing shortcuts is a critical part of progressing users from novice to expert and not something to be taken lightly. It's easy to get it wrong in places. Even with a lot of thought you can't cater for everyone's different environments. Lots of applications allow shortcut customization to help get users out of conflicts with other applications.

  • Get creative: For very complex applications with hundreds of actions, the modifier keys tend to get used for only the most major high level actions.

    • It's not uncommon to make Ctrl+Q trigger a 'Quick access' input where you can type a couple of (unmodified) characters to achieve an action.

    • Another option is Ctrl+K (for Key or Key sequence) followed by more control keys e.g. Ctrl+K,Ctrl+W to bookmark a window or Ctrl+K,Ctrl+D to format a document - Microsoft take this approach in complex applications.

    • In some graphical applications (e.g. CAD/CAM) keyboard input is continually parsed (without a trigger) looking for multi-character mnemonics.

  • Guidelines: And of course - don't forget to use those guidelines

  • Test: As you can probably tell from above, keyboard shortcuts are as big a part of the UX as any other design aspect. You still need to test properly + refine.

  • 2
    Wow, I never thought of Ctrl D as anything except "end of file" and Ctrl G as "Bell". I suppose the newline character can go away now, because web pages have paragraph and break tags. Interesting substituting several characters for just one. Unicode! Doh! – user67695 Mar 7 '17 at 16:33
  • 9
    One thing I might add is that in some programs where text entry is not the primary task, it can make sense to use plain old un-modified letter keys as shortcuts, as well. For example, in Adobe Illustrator P activates the pen tool, / removes the active colour, and X switches between the fill and stroke colour. Using these is much faster than multi-key shortcuts. Also, don't forget the F# keys. – user69458 Mar 7 '17 at 21:55
  • 8
    > Another option is Ctrl+K (for Key or Key sequence) followed by more control keys -- in Microsoft-land, this is known as a chord, e.g. code.visualstudio.com/docs/customization/… "keybindings using chords (two separate keypress actions)" – Bob Mar 8 '17 at 1:00
  • 8
    @Bob Someone should tell Microsoft that's really more of an arpeggio – thunderblaster Mar 8 '17 at 14:54
  • @nocomprende Ctrl+D is double in Notepad++, delete in Eclipse, deselect in Photoshop. Ctrl+G is often go to line in editors, or find next. No one uses it for bell anymore, except in command line – phuclv Mar 12 '17 at 6:16
2

IBM's Common User Access guidelines had great influence in the Windows world, especially in regard to keyboard usage. Even though developers of a lot of newer applications have never heard of it, they ended up copying keyboard commands from older apps that did.

0

The WAI-ARIA spec includes a document detailing best practices for accessible internet applications. The majority of it applies to software in general.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.