Applies to
RibbonCheckBoxItem, RibbonLargeButtonItem, RibbonMenuItem, RibbonSmallButtonItem, and RibbonTabButtonItem controls
Description
Specifies the shortcut key for the ribbon item controls. The shortcut key is a combination of keys that a user can press to select an item whether or not the item is displayed.
When using the various ribbon item controls in the RibbonBar, it's important to be aware of potential conflicts with shortcut keys. According to the Windows operating system's shortcut key mechanism, when multiple items register the same shortcut key, the system will only respond to the shortcut of the first item that successfully registers it. This means that if there are identical shortcut key settings in different RibbonBar across windows or among different items within the same RibbonBar, only the first registered shortcut will be activated, while others will be ignored. Therefore, it's suggested to ensure the uniqueness of shortcut keys during design to avoid functionality conflicts and enhance user experience. For more details, refer to the official Windows documentation regarding hotkey conflicts.
For RibbonMenuItem controls, a user can also specify accelerator keys. See Text for more information.
Usage
In scripts
The shortcut key for ribbon item controls can only be set in scripts.
The Shortcut property takes a string value. The following example specifies that a ribbon tab button can be selected when the user presses the CTRL, ALT, and A keys at the same time:
RibbonTabButtonItem lr_TabButton lr_TabButton.Shortcut = "Ctrl+Alt+A"