Sync CapsLock and NumLock status in legacy mode.

This commit is contained in:
Asura
2022-07-23 08:20:39 -07:00
parent b3b97ee69a
commit 1caee4e306
4 changed files with 34 additions and 26 deletions

View File

@@ -156,6 +156,7 @@ impl KeyboardControllable for Enigo {
}
fn key_up(&mut self, key: Key) {
if self.is_x11 {
dbg!(key);
if self.pynput.send_pynput(&key, false) {
return;
}
@@ -167,12 +168,7 @@ impl KeyboardControllable for Enigo {
}
}
fn key_click(&mut self, key: Key) {
if self.is_x11 {
self.xdo.key_click(key)
} else {
if let Some(keyboard) = &mut self.uinput_keyboard {
keyboard.key_click(key)
}
}
self.key_down(key).ok();
self.key_up(key);
}
}