The ACCELTABLE statement defines a table of accelerator keys for an application.
An accelerator is a keystroke defined by the application to give the user a quick way to perform a task. The WinGetMsg function automatically translates accelerator messages from the application queue into WM_COMMAND, WM_HELP, or WM_SYSCOMMAND messages.
The ACCELTABLE statement has the form:
───ACCELTABLE──┬──────┬────┬───────────┬─── └──id──┘ └─memoption─┘ ────BEGIN─────────────────────────────────── ┌────────────────────────────────────────┐ │ ┌──────,───────┐│ ││ ──┬───────┬─,─┬─────┬──,────acceloption──┴┴─ └keyval─┘ └─cmd─┘ ────END───
id (USHORT)
FIXED
The following options are available:
ALT CHAR
CONTROL
HELP
LONEKEY
SCANCODE
SHIFT
SYSCOMMAND
VIRTUALKEY.
The acceloptions SHIFT, CONTROL, and ALT, cause a match of the accelerator only if the corresponding key is down.
If there are two accelerators that use the same key with different SHIFT, CONTROL, or ALT options, the more restrictive accelerator should be specified first in the table. For example, Shift-Enter should be placed before Enter.
The SYSCOMMAND acceloption causes the keystroke to be passed to the application as a WM_SYSCOMMAND message. The HELP acceloption causes the keystroke to be passed to the application as a WM_HELP message. If neither is specified, a WM_COMMAND message is used.
Example:
ACCELTABLE "MainAcc"BEGIN VK_F1,101,HELP VK_F3,102,SYSCOMMAND END
This generates a WM_HELP with value 101 from VIRTUALKEY accelerator F1 and a WM_SYSCOMMAND with value 102 from VIRTUALKEY accelerator F3.