pub struct ScancodeMapper { /* private fields */ }Expand description
Scancode mapper handles RDP scancode to evdev keycode translation
Implementations§
Source§impl ScancodeMapper
impl ScancodeMapper
Sourcepub fn translate_scancode(
&self,
scancode: u32,
extended: bool,
e1_prefix: bool,
) -> Result<u32>
pub fn translate_scancode( &self, scancode: u32, extended: bool, e1_prefix: bool, ) -> Result<u32>
Translate RDP scancode to Linux evdev keycode
Sourcepub fn translate_keycode(&self, keycode: u32) -> Result<u16>
pub fn translate_keycode(&self, keycode: u32) -> Result<u16>
Translate Linux keycode to RDP scancode
Sourcepub fn set_layout(&mut self, layout: &str)
pub fn set_layout(&mut self, layout: &str)
Set keyboard layout
Sourcepub fn mapped_key_count(&self) -> usize
pub fn mapped_key_count(&self) -> usize
Get total number of mapped keys
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScancodeMapper
impl RefUnwindSafe for ScancodeMapper
impl Send for ScancodeMapper
impl Sync for ScancodeMapper
impl Unpin for ScancodeMapper
impl UnwindSafe for ScancodeMapper
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more