Copyright (c) Hyperion Entertainment and contributors.
Difference between revisions of "UI Style Guide Keyboard"
Steven Solie (talk | contribs) (Created page with "Your application should make gadget and menu items selectable with the keyboard as well as with the mouse. Often these keyboard equivalents will provide shortcuts and a smooth...") |
Steven Solie (talk | contribs) |
||
Line 94: | Line 94: | ||
==== Three Rules ==== |
==== Three Rules ==== |
||
− | * All action should occur on the |
+ | * All action should occur on the down press of the key. |
* The same visual feedback should be given for keyboard activation as is given for mouse activation. |
* The same visual feedback should be given for keyboard activation as is given for mouse activation. |
||
* Avoid assigning the Enter key to a gadget. |
* Avoid assigning the Enter key to a gadget. |
||
Line 102: | Line 102: | ||
{| class="wikitable" |
{| class="wikitable" |
||
| Action button |
| Action button |
||
− | | On the |
+ | | On the down press of the key, the gadget should appear to be pressed in. On release of the key, the gadget should come back out. (Note: at the time this manual was published, GadTools did not support this function.) |
|- |
|- |
||
| Check box |
| Check box |
Revision as of 19:21, 28 June 2012
Your application should make gadget and menu items selectable with the keyboard as well as with the mouse. Often these keyboard equivalents will provide shortcuts and a smoother workflow that is appreciated by the user. Also, allowing the choice conforms to the Amiga credo: "Power to the User".
The set of conventions you should follow to implement this style rule are presented in this section.
Contents
Keyboard Conventions
The arrangement of the Amiga's keyboard varies from model to model, but in general there are always three sets of keys:
- the standard keyboard
- special keys
- modifier keys
The Standard Keyboard
The standard keys consist of the familiar alphanumeric keys found on any standard typewriter. (In English, this is referred to as the QWERTY keyboard, but in German, since the standard keys are arranged differently, it's known as the QWERTZ keyboard. It's called other names in other languages.)
Since the Amiga computer is sold in many different countries with different national keyboards, the arrangement of the standard keys can vary. To handle this, the Amiga uses a special facility known as a keymap that allows the user to change the way the keyboard input is mapped so it will correspond to his country's keyboard layout and characters. For example, to access all the standard German ASCII characters the user can type "Setmap d" in the Shell. Then German characters such as ü and ß will have the same key designations as they do on a standard German keyboard.
Use the keymap facility to handle key assignments on the standard keyboard.
Special Keys
The special keys include the ten function keys on the top row of the Amiga's keyboard, the Help key, the cursor (arrow) keys, the Del key, the backspace key and the Esc key.
Modifier Keys
The modifier keys are the Ctrl, Shift, Alt and Amiga keys found on either side of the space bar. Modifier keys don't do anything by themselves; they alter the meaning of a key that is pressed at the same time. They are also used to modify the meaning of a mouse selection. For example, holding down the Shift key while clicking with the mouse is used for multiple object selection.
Dead Keys
A "dead" key is a key, or combination, that does nothing immediately but modifies the output of the next key. For example, on an American keyboard, Alt-H will superimpose a caret (^) symbol over the next appropriate character.
Although relatively unimportant on the American keyboard, dead keys are important in many languages. Keep in mind that you need to work these in manually if you're doing your own raw key mapping.
System Keyboard Shortcuts
To provide mouse functions from the keyboard, only three features a needed: a way to press the left mouse button, a way to press the right mouse button, and a way to move the mouse pointer. These are provided by the system. They are listed here so you are aware of them and can avoid using these key combinations for any other purpose.
Keyboard Shortcut | Equivalent Mouse Activity |
---|---|
Either Amiga + Left-Alt | Same as clicking left mouse button |
Either Amiga + Right-Alt | Same as clicking right mouse button |
Either Amiga + Cursor Key | Moves mouse pointer |
Either Amiga + Shift + Cursor Key | Moves mouse pointer in larger steps |
Five additional Amiga system functions have keyboard shortcuts:
Default Keyboard Shortcut | Equivalent System Function |
---|---|
Left-Amiga + N | Workbench screen to front |
Left-Amiga + M | Front screen to back |
Left-Amiga + B | Requester OK (leftmost gadget) |
Left-Amiga + V | Requester Cancel (rightmost gadget) |
Left-Amiga + selection button | Drags screen whether the pointer is on the title bar or not |
The first four functions listed above always use Left-Amiga in combination with another key. The second key in the combination can be changed by the user with the IControl Preferences editor in the Prefs drawer of Workbench. For the screen dragging shortcut, the user can change the modifier or combination of modifiers (Ctrl, Amiga, Shift, Alt) that need to be combined with the selection button.
The Left-Amiga Key
Keep in mind that the Left-Amiga key is reserved at all times for system operations and should never be used as a qualifier for an application keyboard shortcut.
Application Keyboard Shortcuts
Your application should provide a way for the user to bind any application function or ARexx macro to a key or combination of keys.
Gadgets
Use a logical letter from the gadget label as the keyboard shortcut. For instance, a gadget labelled "Smoothing" could use the S key as its keyboard control, while a "Left Offset" gadget may use the O key.
Place an underscore under the letter in the gadget label that activates the gadget. (Note: although the letter is capitalized on the label, the default action should react to the lower-case letter. Some gadgets have a different action for the shifted version of the letter. See the list on the next page.)
Three Rules
- All action should occur on the down press of the key.
- The same visual feedback should be given for keyboard activation as is given for mouse activation.
- Avoid assigning the Enter key to a gadget.
Feedback from Keystroke-Activated Gadgets
Action button | On the down press of the key, the gadget should appear to be pressed in. On release of the key, the gadget should come back out. (Note: at the time this manual was published, GadTools did not support this function.) |
Check box | Toggle the state of the check mark. |
Scrolling list | Unshifted would cycle forwards through the choices. Shifted would cycle backwards through the choices. |
Radio button | Unshifted would cycle forwards through the choices. Shifted would cycle backwards through the choices. |
Cycle gadget | Unshifted would cycle forwards through the choices. Shifted would cycle backwards through the choices. |
Selection gadget | Unshifted would cycle forwards through the choices. Shifted would cycle backwards through the choices. |
Scroll gadget | Unshifted would cycle forwards through the choices. Shifted would cycle backwards through the choices. |
Slider | Unshifted would increase the level by one unit. Shifted would decrease the level by one unit. |
Text box | Activate the gadget for entry. |
Numeric entry | Activate the gadget for entry. |
Menus
Use a Right-Amiga combination as the default keyboard shortcut for a menu item. Here is a list of the defaults in the English language for an application that has standard menus. This should be localized to the language at hand for non-English applications.
Project Menu Right-Amiga + N New Right-Amiga + O Open... Right-Amiga + S Save Right-Amiga + A Save As... Right-Amiga + P Print Right-Amiga + Q Quit Program
Edit Menu Right-Amiga + X Cut Right-Amiga + C Copy Right-Amiga + V Paste Right-Amiga + Z Undo
Use of the Special Keys
As stated previously, the special keys are the ten function keys, the Del key, the Help key, the cursor (arrow) keys and the Esc key.
Cursor Keys
Cursor keys are a convenient way to control the movement of the cursor inside an application. Here are some standard ways to use them:
Unmodified Cursor
Move a small amount in the specified direction. Often this is one unit such as a character in a word processor or a pixel in a paint package, but it could be several pixels in an application where navigation is more important than fine control.
Shift + Cursor
Move to the appropriate extreme of the window, or shift the view by one window full if you're already at that extreme.
In applications such as a word processor where the two directions are not symmetrical, shifted cursor keys could take on different meanings. Shifted up and down cursors would page through windowfuls while the shifted left and right cursors would show more on the left and right if there is more to show. Of course it is often the case that the width of the document fits in the window, so the shifted left and right cursors could act as beginning-and end-of-line commands (or edge of window if the cursor isn't constrained to the form of the text).
Alt-Cursor
This is used for application-specific functions. It's usually semantic units such as words in a text processor or fields in a spreadsheet.
Ctrl-Cursor
Move to the appropriate extreme of the project (beginning, end, extreme left, extreme right).
In the word processor example, the up and down cursor keys would take the cursor to the beginning and end of the file, respectively. But again, if the file fits within the width of the window, the left and right cursor keys combined with Alt would act like their shifted cousins.
Function Keys
Function keys should generally be reserved for the user to define. If your application does make use of them, then it should at least allow the user to redefine or modify them.
Help Key
If your application has built-in help, use the Help key to trigger it from the keyboard. Avoid giving the user that helpless feeling he gets when he presses the Help key and nothing happens.