Skip to main content

default_keymap

Function default_keymap 

Source
pub fn default_keymap() -> Keymap<Action>
Available on crate feature menubar only.
Expand description

The default menubar shortcuts:

KeysAction
F10, AltAction::Focus
ArrowRightAction::NextMenu
ArrowLeftAction::PreviousMenu
ArrowDown, Enter, SpaceAction::Open
EscapeAction::Close

While a menu is open the bar resolves these itself, before the open menu’s own keymap. While the bar is closed, only Focus claims a key unless the bar has focus, so the arrows stay free for the rest of the app. Alt with a menu’s mnemonic letter opens that menu at any time. keys::subscription delivers a bare Alt only when it is released with nothing pressed in between, so Alt chords never focus the bar.