Fix sync Numpad status

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

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);