Keyboard Support
Keyboard support is comprised of command key, focus key, and keyboard navigation.
RadMenu will seamlessly switch between mouse and keyboard navigation.
In order to configure keyboard support with RadMenu its KeyboardNaviagationSettings should be set:
<telerik:RadMenu ID="RadMenu1" runat="server" >
<KeyboardNavigationSettings CommandKey="Alt" FocusKey="M" />
<Items>
<telerik:RadMenuItem Text="File" >
</telerik:RadMenuItem>
<telerik:RadMenuItem Text="Edit" >
</telerik:RadMenuItem>
</Items>
</telerik:RadMenu>
The KeyboardNavigationSettings exposes two properties to configure the keyboard combination that sets focus to the control:
- FocusKey: An upper-case letter or number.
- CommandKey: Ctrl , Alt, Shift, or any combination of two of these keys.
When there are multiple Menus on a given page, each of them may have a different activation combination.
In this particular example, the [CommandKey] and the [FocusKey] can be customized in the Demo Configurator.
Note: It is recommended to avoid [CommandKey] + [FocusKey] combinations matching keyboard shortcuts used in the browsers. If the combination coincides with an existing shortcut the control may be unable to focus.
Pressing [CommandKey] + [FocusKey]) puts the focus on the first Menu item allowing you to navigate the items:
- Pressing Left or Right Arrow keys will navigate through the items.
- Pressing Down or Up Arrow keys will expand submenus with child items.
- Pressing Enter or Spacer keys will select the focused item and expand its submenu
- Pressing Tab will focus the Menu's first item
- Pressing Esc will close the expanded submenu