Accelerator Keys for Menu Items and Toolbar Buttons
Posted: Tue Aug 31, 2004 7:22 am
The Zeus menu does not lists an accelerator key for all menu items, but this does not mean some of the menu items do not have accelerator keys.
If fact the opposite is true. Because all toolbar buttons and menu items map directly to keyboard functions, the keyboard remapping feature means it is possible to assign any accelerator key to any menu item or toolbar button.
This is done using the Options, Editor Options menu and in the Keyboard Mapping section editing the currently active keyboard mapping.
The tricky part is knowing which of the many hundreds of keyboard functions map to which toolbar button or menu item.
Luckily there is a simple way to find the keyboard function. Consider the case where an accelerator is required for the Toolbar, Copy button and the Workspace, Source Control, Show History menu item.
To determine the names of these keyboard functions just record a simple macro script as follows:
A quick inspection of the macro script reveals the two keyboard functions that need to be remapped are:
If fact the opposite is true. Because all toolbar buttons and menu items map directly to keyboard functions, the keyboard remapping feature means it is possible to assign any accelerator key to any menu item or toolbar button.
This is done using the Options, Editor Options menu and in the Keyboard Mapping section editing the currently active keyboard mapping.
The tricky part is knowing which of the many hundreds of keyboard functions map to which toolbar button or menu item.
Luckily there is a simple way to find the keyboard function. Consider the case where an accelerator is required for the Toolbar, Copy button and the Workspace, Source Control, Show History menu item.
To determine the names of these keyboard functions just record a simple macro script as follows:
- Macros, Record Start Stop menu
- Click on the Toolbar Copy button
- Click on the Workspace, Source Control, Show History menu
- Macros, Record Start Stop menu
- Macros, Veiw Source menu
Code: Select all
function key_macro()
screen_update_disable()
MarkCopyEx()
SccFileHistory()
screen_update_enable()
screen_update()
end
key_macro() -- run the macro
Code: Select all
MarkCopyEx()
SccFileHistory()