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: u16
USB HID value for a specific key
evdev: u16
Linux kernel evdev value for a specific key
xkb: u16
X11 value for a specific key
win: u16
Windows value for a specific key
mac: u16
Mac value for a specific key
code: Option<KeyMappingCode>
W3 browser event code for a specific key
id: KeyMappingId
Id for a specific key
modifier: Option<KeyModifiers>
USB HID bitmask
Implementations
sourceimpl 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
sourceimpl From<KeyMappingCode> for KeyMap
impl From<KeyMappingCode> for KeyMap
sourcefn from(code: KeyMappingCode) -> KeyMap
fn from(code: KeyMappingCode) -> KeyMap
Converts to this type from the input type.
sourceimpl From<KeyMappingId> for KeyMap
impl From<KeyMappingId> for KeyMap
sourcefn from(id: KeyMappingId) -> KeyMap
fn from(id: KeyMappingId) -> KeyMap
Converts to this type from the input type.
sourceimpl PartialEq<KeyMap> for KeyMap
impl PartialEq<KeyMap> for KeyMap
sourceimpl TryFrom<KeyMapping> for KeyMap
impl TryFrom<KeyMapping> for KeyMap
impl Copy for KeyMap
impl Eq for KeyMap
impl StructuralEq for KeyMap
impl StructuralPartialEq for KeyMap
Auto Trait Implementations
impl RefUnwindSafe for KeyMap
impl Send for KeyMap
impl Sync for KeyMap
impl Unpin for KeyMap
impl UnwindSafe for KeyMap
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more