Fix sync Numpad status

This commit is contained in:
Asura committed 2022-07-18 23:04:04 +08:00
1 parent a8e4591217
commit a118056c30
2 files changed
+11 -6

No files matched your search

+2 -4
View File
@@ -990,10 +990,8 @@ impl Handler {
if get_key_state(enigo::Key::CapsLock) {
key_event.modifiers.push(ControlKey::CapsLock.into());
}
if self.peer_platform() != "Mac OS" {
if get_key_state(enigo::Key::NumLock) && common::valid_for_numlock(&key_event) {
key_event.modifiers.push(ControlKey::NumLock.into());
}
if get_key_state(enigo::Key::NumLock) {
key_event.modifiers.push(ControlKey::NumLock.into());
}
self.send_key_event(key_event, 1);