pub struct KeyMap {
pub usb: u16,
pub evdev: u16,
pub xkb: u16,
pub win: u16,
pub mac: u16,
pub code: Option<KeyMappingCode>,
pub id: KeyMappingId,
pub modifier: Option<KeyModifiers>,
}Expand description
Ergonomic access to a specific key’s mapping of values
Fields§
§usb: u16USB HID value for a specific key
evdev: u16Linux kernel evdev value for a specific key
xkb: u16X11 value for a specific key
win: u16Windows value for a specific key
mac: u16Mac value for a specific key
code: Option<KeyMappingCode>W3 browser event code for a specific key
id: KeyMappingIdId for a specific key
modifier: Option<KeyModifiers>USB HID bitmask
Implementations§
Source§impl KeyMap
impl KeyMap
Sourcepub fn from_key_mapping(key_mapping: KeyMapping) -> Result<KeyMap, ()>
pub fn from_key_mapping(key_mapping: KeyMapping) -> Result<KeyMap, ()>
If you don’t want to use TryFrom, until it is stabilized
Trait Implementations§
Source§impl From<KeyMappingCode> for KeyMap
impl From<KeyMappingCode> for KeyMap
Source§fn from(code: KeyMappingCode) -> KeyMap
fn from(code: KeyMappingCode) -> KeyMap
Converts to this type from the input type.
Source§impl From<KeyMappingId> for KeyMap
impl From<KeyMappingId> for KeyMap
Source§fn from(id: KeyMappingId) -> KeyMap
fn from(id: KeyMappingId) -> KeyMap
Converts to this type from the input type.
Source§impl TryFrom<KeyMapping> for KeyMap
impl TryFrom<KeyMapping> for KeyMap
impl Copy for KeyMap
impl Eq for KeyMap
impl StructuralPartialEq for KeyMap
Auto Trait Implementations§
impl Freeze for KeyMap
impl RefUnwindSafe for KeyMap
impl Send for KeyMap
impl Sync for KeyMap
impl Unpin for KeyMap
impl UnwindSafe for KeyMap
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