Command_GetAccelerator()

Examples


The Command_GetAccelerator() function retrieves the shortcut that is defined for the command.

Syntax

Command_GetAccelerator(command_tag, modifier, key)

Parameters

command_tag – The integer tag value for the command whose shortcut is being retrieved.

modifier – A long integer specifying the modifier key combination for the shortcut. The value is 0 (zero) if no modifier is used. Otherwise, the value corresponds to one of the following constants:

[spacer]

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 used for the shortcut. If the key is a function key, the value corresponds to one of the following constants:

[spacer]

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


Return value

A boolean. The value true indicates the shortcut was retrieved, while false indicates it was not.


Documentation Feedback