The Command_SetAccelerator() function sets the shortcut that is defined for the command.
Command_SetAccelerator(command_tag, modifier, key)
• command_tag – The integer tag value for the command whose shortcut is being set.
• modifier – A long integer specifying the modifier key combination for the shortcut. The value 0 (zero) specifies no modifier is to be used. Otherwise, the value corresponds to one of the following constants:
Constant |
Description |
---|---|
COMMAND_SHORTCUT_CTRL |
Control |
COMMAND_SHORTCUT_CTRLSHIFT |
Control + Shift |
COMMAND_SHORTCUT_CTRLALT |
Control + Alt |
COMMAND_SHORTCUT_ALT |
Alt |
COMMAND_SHORTCUT_ALTSHIFT |
Alt + Shift |
COMMAND_SHORTCUT_CTRLALTSHIFT |
Control + Alt + Shift |
• key – A long integer containing the ASCII value of the alpha-numeric key to use for the shortcut. If the key is a function key, the value corresponds to one of the following constants:
Constant |
---|
COMMAND_SHORTCUT_KEY_F1 |
COMMAND_SHORTCUT_KEY_F2 |
COMMAND_SHORTCUT_KEY_F3 |
COMMAND_SHORTCUT_KEY_F4 |
COMMAND_SHORTCUT_KEY_F5 |
COMMAND_SHORTCUT_KEY_F6 |
COMMAND_SHORTCUT_KEY_F7 |
COMMAND_SHORTCUT_KEY_F8 |
COMMAND_SHORTCUT_KEY_F9 |
COMMAND_SHORTCUT_KEY_F10 |
COMMAND_SHORTCUT_KEY_F11 |
COMMAND_SHORTCUT_KEY_F12 |
A boolean. The value true indicates the shortcut was set, while false indicates it was not.