pub struct KeyHint {
pub modifiers: Modifiers,
pub code: KeyCode,
}Expand description
Structured keybinding hint for menu rows.
Display is canonicalized (Ctrl+Shift+Z), so inconsistent free text
("ctrl + l" vs "Ctrl+U") is impossible by construction. The hinted
key is a KeyCode, shared with hook matching and keymaps.
Fields§
§modifiers: ModifiersActive modifiers, rendered first in canonical Ctrl, Alt, Shift, Meta order.
code: KeyCodeThe hinted key.
Implementations§
Trait Implementations§
impl Copy for KeyHint
impl Eq for KeyHint
impl StructuralPartialEq for KeyHint
Auto Trait Implementations§
impl Freeze for KeyHint
impl RefUnwindSafe for KeyHint
impl Send for KeyHint
impl Sync for KeyHint
impl Unpin for KeyHint
impl UnsafeUnpin for KeyHint
impl UnwindSafe for KeyHint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more