EditLive! 9 Documentation : Mnemonics and Shortcuts for Menus

Using an EditLive! configuration file, you can create your own mnemonics and shortcuts for any menu or menu item appearing in EditLive!.

The following attributes can be applied to the following configuration file elements:

mnemonic

 A mnemonic allows developers to load specific menus and menu items by pressing combinations of ALT and a specific keyboard key. When holding ALT, each menu and menu item will display an underlined letter. Pressing the corresponding keyboard key will activate the menu or menu item.

Assign a single character to the mnemonic attribute.

Example

The following custom menu item has a mnemonic set to the A key.

<customMenuItem
 name="customMenuItem1"
 text="Custom Menu Item"
 action="raiseEvent"
 value="customMenuItem1Raised"
 mnemonic="A"/>

shortcut

Shortcuts define an explicit combination of keyboard keys that will invoke the specified menu, menu item or custom menu item. The value assigned to the shortcut attribute is required to adhere to the standard Java Keystroke class.

Example

The following custom menu item will be invoked if the user presses the CTRL, ALT and X keys simultaneously.

<customMenuItem
 name="customMenuItem1"
 text="Custom Menu Item"
 action="raiseEvent"
 value="customMenuItem1Raised"
 shortcut="control alt X"/>
Example

The following custom menu item will be invoked if the user presses the SHIFT and the DELETE keys simultaneously.

<customMenuItem
 name="customMenuItem1"
 text="Custom Menu Item"
 action="raiseEvent"
 value="customMenuItem1Raised"
 shortcut="shift DELETE"/> 

Remarks

Many <menuItem> configuration elements already have mnemonics and shortcuts specified. If you use the mnemonic or shortcut attributes on these elements, you will override the default.

For a list of the default mnemonics and shortcuts for the menus and menu items available for EditLive!, see the Menu and Toolbar Item List in the Developer Guide for this SDK.