fix #2211:CAPS Lock don't work

This commit is contained in:
Asura 2022-12-03 00:26:45 -08:00 committed by Chieh Wang
parent 3b60304d14
commit dff5d55f50

View File

@ -122,7 +122,10 @@ mod components {
std::thread::spawn(move || {
let func = move |event: Event| match event.event_type {
EventType::KeyPress(key) | EventType::KeyRelease(key) => {
// todo!: CAPSLOCK don't work
// fix #2211CAPS LOCK don't work
if key == Key::CapsLock || key == Key::NumLock {
return Some(event);
}
if KEYBOARD_HOOKED.load(Ordering::SeqCst) {
keyboard::client::process_event(event);
return None;