#[repr(C)]pub struct Keybind {
pub key: u16,
pub alt: bool,
pub ctrl: bool,
pub shift: bool,
}Expand description
A keybind.
Fields§
§key: u16The key.
alt: boolAlt modifier.
ctrl: boolControl modifier.
shift: boolShift modifier.
Implementations§
Source§impl Keybind
impl Keybind
Sourcepub fn without_modifiers(key: u16) -> Self
pub fn without_modifiers(key: u16) -> Self
Creates a new keybind without modifiers.
Sourcepub fn has_modifiers(&self) -> bool
pub fn has_modifiers(&self) -> bool
Checks whether the keybind has modifiers.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Keybind
impl<'de> Deserialize<'de> for Keybind
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
Auto Trait Implementations§
impl Freeze for Keybind
impl RefUnwindSafe for Keybind
impl Send for Keybind
impl Sync for Keybind
impl Unpin for Keybind
impl UnwindSafe for Keybind
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