pub struct KeyCombo { /* private fields */ }Expand description
A platform-neutral keyboard chord.
Human-readable formats store the canonical text chord; binary IPC stores validated modifier bits and a USB HID usage.
Implementations§
Source§impl KeyCombo
impl KeyCombo
Sourcepub const fn key(&self) -> KeyboardUsage
pub const fn key(&self) -> KeyboardUsage
USB HID keyboard usage for the ordinary key.
Sourcepub const fn has_command(&self) -> bool
pub const fn has_command(&self) -> bool
Whether the chord includes Command/Meta (the cross-platform primary modifier).
Sourcepub const fn has_control(&self) -> bool
pub const fn has_control(&self) -> bool
Whether the chord includes Control.
Sourcepub const fn has_option(&self) -> bool
pub const fn has_option(&self) -> bool
Whether the chord includes Option/Alt.
Sourcepub fn rendered_label(&self) -> String
pub fn rendered_label(&self) -> String
Canonical user-facing chord label.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for KeyCombo
impl<'de> Deserialize<'de> for KeyCombo
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for KeyCombo
impl StructuralPartialEq for KeyCombo
Auto Trait Implementations§
impl Freeze for KeyCombo
impl RefUnwindSafe for KeyCombo
impl Send for KeyCombo
impl Sync for KeyCombo
impl Unpin for KeyCombo
impl UnsafeUnpin for KeyCombo
impl UnwindSafe for KeyCombo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.