Struct Key
pub struct Key {
pub usage_code: u8,
pub modifiers: KeyboardModifiers,
}Expand description
A consumer key: HID usage code with optional keyboard modifiers.
A modifiers value of zero is equivalent to no modifiers.
Fields§
§usage_code: u8HID consumer usage code.
modifiers: KeyboardModifiersKeyboard modifiers.
Implementations§
§impl Key
impl Key
pub const fn new_with_modifiers(
usage_code: u8,
modifiers: KeyboardModifiers,
) -> Key
pub const fn new_with_modifiers( usage_code: u8, modifiers: KeyboardModifiers, ) -> Key
Constructs a key with the given usage code and modifiers.
Trait Implementations§
impl Copy for Key
§impl<'de> Deserialize<'de> for Key
impl<'de> Deserialize<'de> for Key
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Key, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Key, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Key
Auto Trait Implementations§
impl Freeze for Key
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnsafeUnpin for Key
impl UnwindSafe for Key
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