Previous Topic: Add a Menu ItemNext Topic: Specify an Action to Perform


Define a Keyboard Shortcut

The optional child attribute <accelerator> of a menu item lets you specify a keyboard shortcut that completes a menu action. It consists of the following items:

Example: Define a Keyboard Shortcut

This example specifies that the menu action is performed by pressing Ctrl+L.

<accelerator modifiers="2">VK_L</accelerator>