How Do I Set an Accelerator for a Menu Entry? (Magic xpa 2.x)
Many users like to use Accelerator keys, otherwise known as “Hot keys”, to quickly access functions they use a lot. When you are creating an application, you can set your own Accelerator keys as needed, for any menu entry.
Position the cursor on the Acc Key column.
Zoom (F5 or double click). The Key Definition window will appear.
Press the key combination you want. In our example, we pressed Ctrl+Shift+L. You can use any key combination you want, including Alt keys and Enter.
As soon as you press your key combination, the Key Definition window will close, and your key combination will appear in the Acc Key column.
Now, when you run your project, pressing the Accelerator key will execute the item on the menu.
If you try to set an Accelerator for an Internal event, you will get a message:
The Accelerator for an Internal event is set automatically, based on the keyboard mapping (Options->Settings->Keyboard Mapping).
However, when you change the keyboard mapping, you need to be sure to change the keyboard on the Runtime tab, as shown below. When you change the keyboard mapping, the changes will be automatically reflected in your menu entry.
The Online and Rich Client Samples projects (program MN01 and RMN01)