pub struct Shortcut {
pub modifiers: ModifierList,
pub key: Key,
}
Expand description
A keyboard shortcut consisting of zero or more modifier keys and a non-modifier key
Examples:
Create from keys:
let shortcut = Shortcut::new(&[Modifier::Meta], Key::KeyN);
Parse from string:
let shortcut: Shortcut = "<Meta>-KeyN".parse()?;
Fields§
§modifiers: ModifierList
§key: Key
Implementations§
Trait Implementations§
impl Eq for Shortcut
impl StructuralPartialEq for Shortcut
Auto Trait Implementations§
impl Freeze for Shortcut
impl RefUnwindSafe for Shortcut
impl Send for Shortcut
impl Sync for Shortcut
impl Unpin for Shortcut
impl UnwindSafe for Shortcut
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