A hot key defines a keyboard combination that triggers an event. The focus is not changed.
Hot keys can be defined for different UI elements by setting the hotkey property to the relevant value. The hotkey property is of type WDHotkey. The relevant hot key is displayed within the tool tip of the UI element. If the user presses the assigned key combination, the onAction event of the relevant UI element is triggered.
Hot keys can be defined for the following UI elements:
● Buttons: Button, ToolBarButton
● Links: LinkToAction, LinkToURL, ToolBarLinkToAction, ToolBarLinkToURL
● MenuActionItem
To define the scope of a hot key, you can define different containers and UI elements as hot key catchers setting the handleHotkeysproperty to true. The following UI elements can be used:
● Containers: ScrollContainer, Tray, Group and TransparentContainer
● UI elements: Table, TabStrip
If the user presses a hot key, the Web Dynpro Framework checks whether the container the UI element is placed into is defined as a hot key catcher. If no, the next parent container is checked. If yes, no other parent containers are checked.
We recommend to define the RootElement of your main view as hot key catcher, since a user expects hot keys to be relevant for the entire screen.
...
1. Select the relevant UI element, for example a Button, switch to the Properties view and choose a value for hotkey, for example CTRL + 5.
2. To define the scope for which the hot key is valid, select one of the surrounding containers, preferred the view’s RootElement, and set the handleHotkeys property to true.
If the user presses the CTRL + 5, the onAction event of the Button is triggered.