[ Previous | Next | Contents | Glossary | Home | Search ]
Motif and CDE 2.1 Style Guide

Using Shortcuts

To speed user actions, you can provide your interface with shortcuts such as first-letter cursor navigation, mnemonics, default actions, and shortcut keys. The following sections discuss these shortcuts.

First-Letter Cursor Navigation

You can use first-letter cursor navigation in list boxes, containers, and similar controls. In first-letter cursor navigation, the user navigates to and selects an item in a list by inputting (from the keyboard) the first character of the item. Inputting the character again allows the user to navigate to and select the next item in the list beginning with that character (see Figure 22).

Figure 22. First-Letter Cursor Navigation in an Index List.

View figure.

For more information, see the First-Letter Cursor Navigation reference page.


A mnemonic is a readily recognized character that the user can type to move the cursor quickly from one place in a window to another and, in some cases, to activate or change the value of a specified control. A mnemonic is usually represented as a character from the Control label and is underlined in the label to indicate its function as a mnemonic (see Figure 23).

The user presses Alt and the mnemonic key to activate action, cascading, and dialog choices in buttons and cascading choices in menu bars. Also, the user presses Alt and the mnemonic key for a label associated with a tab group to navigate to the tab group. The user presses only the mnemonic key when in a menu or tab group to activate or toggle a choice in the same menu or tab group.

For example, the user may need to navigate to a specific choice within the File menu. To do so, the user presses Alt F, which displays the File menu and highlights the first item within it. Then, the user presses S to activate the Save choice.

Figure 23. Mnemonics.

View figure.

For more information, see the Mnemonic reference page.

Shortcut Keys

A shortcut key, or accelerator, is a key along with a modifier that the user can press to activate a choice (see Figure 24). You should provide shortcut keys for choices that the user frequently chooses.

A shortcut key usually appears next to the choice to which it pertains so that the user can learn to associate the shortcut key with the choice. You might want to provide a mechanism that allows users to turn off the display of the shortcut keys. Appendix B. "Keyboard Model and Key Bindings" lists predefined shortcut keys.

Figure 24. Shortcut Keys.

View figure.

For more information, see the Shortcut Key reference page.

Default Action

Within a window, especially a secondary window used for a message, there is often an action that the user may want to perform at any given time. Your application can have this action be the default action of the window; the user can then invoke it (when the window has focus) simply by pressing Enter, Return, or keypadEnter. If Enter is used for other purposes, such as when the focus is in multiline text, use Ctrl Enter.

In general, the default action is the action choice of a push button displayed in the window. You should display that push button with default emphasis.

Assigning a default action allows the user to invoke an action without first navigating to (then activating) the desired choice. Default actions are also useful for inhibiting the user from making potentially harmful choices. Figure 25 illustrates the default action for a text-entry dialog.

Figure 25. Default Action.

View figure.

For more information, see the Default Action reference page.

[ Previous | Next | Contents | Glossary | Home | Search ]