pub struct Chord {
pub ctrl: bool,
pub alt: bool,
pub shift: bool,
pub meta: bool,
pub key: String,
}Expand description
One chord: modifiers and a logical key, or a pointer gesture
(Chord::pointer).
Fields§
§ctrl: bool§alt: bool§shift: bool§meta: bool§key: StringLowercase key name: a, 3, f1, space, tab, escape; or
a pointer gesture’s name, lowercase (wheel, middledrag).
Implementations§
Source§impl Chord
impl Chord
pub fn parse(text: &str) -> Result<Chord, String>
Sourcepub fn pointer_gesture(pointer: Pointer) -> Chord
pub fn pointer_gesture(pointer: Pointer) -> Chord
A pointer gesture without modifiers.
Sourcepub fn is_pointer(&self) -> bool
pub fn is_pointer(&self) -> bool
Whether it is a pointer gesture.
Sourcepub fn same_modifiers(&self, other: &Chord) -> bool
pub fn same_modifiers(&self, other: &Chord) -> bool
The same modifiers, nothing else (what a held set of keys is compared with).
Trait Implementations§
Source§impl Ord for Chord
impl Ord for Chord
Source§impl PartialOrd for Chord
impl PartialOrd for Chord
impl Eq for Chord
impl StructuralPartialEq for Chord
Auto Trait Implementations§
impl Freeze for Chord
impl RefUnwindSafe for Chord
impl Send for Chord
impl Sync for Chord
impl Unpin for Chord
impl UnsafeUnpin for Chord
impl UnwindSafe for Chord
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