pub fn default_keymap() -> Keymap<Action>Available on crate feature
menubar only.Expand description
The default menubar shortcuts:
| Keys | Action |
|---|---|
F10, Alt | Action::Focus |
ArrowRight | Action::NextMenu |
ArrowLeft | Action::PreviousMenu |
ArrowDown, Enter, Space | Action::Open |
Escape | Action::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.