A NEW TODAY IS DAWNING!

TB0002 - Key Components of Static Accelerators

Number: TB0002

Availability: As of BuildPro 8.00, all users.


Introduction

An Accelerator allows the use of a shortcut key sequence (i.e. F4) to initiate a specific action for an application. BuildProfessional allows both static and dynamic accelerators. Dynamic accelerators are assigned at runtime; an action is simply assigned the next available accelerator key combination during the work session. Static accelerators must be defined by the developer and are always assigned the same key sequence.

Accelerators can be defined in the configuration file (wintoday.ini for Windows, .todayrc for UNIX servers) or hard coded in the development environment. It is generally better practice to define resources, such as available function keys, in the configuration file rather than hard coding them in the application. In a client / server configuration the keys need only be defined on the server side.
 

Format

Accelerator definitions associate a keystroke sequence with a virtual key in the form when defined in the configuration file:

alias=[modifier-][modifier-]key

…and in the development environment:

[modifier-][modifier-]key

Alias

The alias is any text describing the key sequence or function. The alias may not contain spaces.
 

Modifier

The modifiers are optional and can be one or both of Control and Shift. Certain keys require the Control modifier such as the letter a-z.
 

Key

The key component can be one of the following :

     
F1 F2 F3
F4 F5 F6
F7 F8 F9
F10 F11 F12
HOME END INSERT
DELETE UP_ARROW DOWN_ARROW
LEFT_ARROW RIGHT_ARROW PAGE_UP
PAGE_DOWN ENTER ESCAPE
BACKSPACE TAB A
B C D
E F G
H I J
K L M
N O P
Q R S
T U V
W X Y
Z SPECIAL EXTENDED
USER_DEFINED KEYPAD_0 KEYPAD_1
KEYPAD_2 KEYPAD_3 KEYPAD_4
KEYPAD_5 KEYPAD_6 KEYPAD_7
KEYPAD_8 KEYPAD_9 CAPS_LOCK
BREAK PRINT_SCREEN META
LEFT_META RIGHT_META LEFT_META_OEM
RIGHT_META_OEM 0 1
2 3 4
5 6 7
8 9 F13
F14 F15 F16
F17 F18 F19
F20 F21 F22
F23 F24 F25
F26 CAPS_LOCK SCROLL_LOCK
MULTIPLY ADD SUBTRACT
DIVIDE SPACE EXCLAMATION
DOUBLE_QUOTE HASH DOLLAR
PERCENT AMPERSAND BACK_QUOTE
LEFT_BRACKET RIGHT_BRACKET ASTERIX
COMMA FULL_STOP FORWARD_SLASH
COLON SEMI_COLON LESS_THAN
EQUAL GREATER_THAN QUESTION_MARK
AT LEFT_SQUARE_BRACKET BACK_SLASH
RIGHT_SQUARE_BRACKET CARAT UNDER_SCORE
FORWARD_QUOTE LEFT_BRACE VERTICAL_BAR
RIGHT_BRACE TILDE BACKTAB

Examples

In the configuration file:

Lookup=F4

Menu=Shift-F4

GoBack=Control-Shift-PAGE_UP

In the development environment:

F4

Shift-F4

Control-Shift-PAGE_UP


Predefined Keys

Keep in mind that user interface standards define the use of certain key sequences such as F1 for Help, Ctrl-C for copy etc.