rename: sync status && add numlock capslock

This commit is contained in:
asur4s
2022-12-13 15:40:44 -08:00
parent 14e21863ba
commit d675bfa7e3
2 changed files with 5 additions and 5 deletions

View File

@@ -830,7 +830,7 @@ fn click_numlock(en: &mut Enigo) {
en.key_click(enigo::Key::NumLock);
}
fn sync_status(key_event: &KeyEvent) {
fn sync_numlock_capslock_status(key_event: &KeyEvent) {
let mut en = ENIGO.lock().unwrap();
let client_caps_locking = is_modifier_in_key_event(ControlKey::CapsLock, key_event);
@@ -851,7 +851,7 @@ fn sync_status(key_event: &KeyEvent) {
}
if need_click_numlock && !disable_numlock {
click_capslock(&mut en);
click_numlock(&mut en);
}
}
@@ -1001,7 +1001,7 @@ pub fn handle_key_(evt: &KeyEvent) {
}
if evt.down {
sync_status(evt)
sync_numlock_capslock_status(evt)
}
match evt.mode.unwrap() {
KeyboardMode::Map => {