mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
Fix sycn of CapsLock
This commit is contained in:
@@ -822,6 +822,11 @@ fn legacy_keyboard_mode(evt: &KeyEvent) {
|
||||
}
|
||||
|
||||
fn translate_keyboard_mode(evt: &KeyEvent) {
|
||||
// Caps affects the keycode map of the peer system(Linux).
|
||||
let mut en = ENIGO.lock().unwrap();
|
||||
if en.get_key_state(Key::CapsLock){
|
||||
rdev_key_click(RdevKey::CapsLock);
|
||||
}
|
||||
let chr = char::from_u32(evt.chr()).unwrap_or_default();
|
||||
if evt.down {
|
||||
KBD_CONTEXT.lock().unwrap().unicode_char_down(chr).expect("unicode_char_down error");
|
||||
|
||||
Reference in New Issue
Block a user