pub struct Keymap<'a> { /* private fields */ }
Expand description
A Us Qwerty keymap
Implementations§
Source§impl<'a> Keymap<'a>
impl<'a> Keymap<'a>
Sourcepub fn apply(
&self,
key: Key,
modifier_state: &impl ModifierChecker,
lock_state: &impl LockStateChecker,
) -> Option<KeyMeaning>
pub fn apply( &self, key: Key, modifier_state: &impl ModifierChecker, lock_state: &impl LockStateChecker, ) -> Option<KeyMeaning>
Applies the keymap to the given key.
Sourcepub fn hid_usage_to_code_point(
&self,
hid_usage: u32,
modifier_state: &impl ModifierChecker,
lock_state: &impl LockStateChecker,
) -> Result<u32>
pub fn hid_usage_to_code_point( &self, hid_usage: u32, modifier_state: &impl ModifierChecker, lock_state: &impl LockStateChecker, ) -> Result<u32>
Converts a HID usage for a key to a Unicode code point where such a code point exists, based on a US QWERTY keyboard layout. Returns EMPTY_CODEPOINT if a code point does not exist (e.g. Alt), and an error in case the mapping somehow fails.
pub fn hid_usage_to_code_point_for_mods( &self, hid_usage: u32, shift: bool, caps_lock: bool, ) -> Option<u32>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Keymap<'a>
impl<'a> RefUnwindSafe for Keymap<'a>
impl<'a> Send for Keymap<'a>
impl<'a> Sync for Keymap<'a>
impl<'a> Unpin for Keymap<'a>
impl<'a> UnwindSafe for Keymap<'a>
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