Menu item accelerator key¶
accelerator = key_id
The accelerator key. When this key is pressed the menu item is brought into focus and selected. Accelerator keys are effective whenever the menu has control, regardless of whether any subitem menu is open. They do not, however, work if the item is disabled.
key_id must be one of the following:
1 |
The name of a valid function key within Sculptor. These are: F1 – F32; BACKTAB; DEL_LINE; INS_LINE; PGDN; PGUP; SCRL_DN; SCRL_UP; TAB; HOME; END |
2 |
A key pressed in conjunction with CTRL, SHIFT, ALT or ALT GR, e.g. CTRL-A, ALT-G, SHIFT-S. The definitions AK_SHIFT, AK_CONTROL, AK_ALT and AK_ALTGR, listed under Accelerator keys in $SCULPTOR/include/sculptor.h, are used to achieve this, as shown in the examples below, the syntax being the definition followed by the pipe symbol followed by the ASCII code of the specified character. The single quote syntax (e.g. ‘x’) generates the ASCII code of the character included in the single quotes. |
Note
It is not possible to combine these two methods - e.g. CTRL-F1 cannot be used.
EXAMPLES
accelerator = F16
accelerator = AK_CONTROL | 'a'
accelerator = AK_ALT | 'g'
accelerator = AK_SHIFT | 's'
RELATED TOPICS |