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

+9 -2
View File
@@ -810,9 +810,8 @@ async fn send_sas() -> ResultType<()> {
#[cfg(test)]
mod test {
use super::*;
use rdev::{listen, simulate, Event, EventType, Key};
use rdev::{listen, Event, EventType, Key};
use std::sync::mpsc;
use std::thread;
#[test]
fn test_handle_key() {
@@ -847,4 +846,12 @@ mod test {
assert_eq!(listen_evt.event_type, EventType::KeyRelease(Key::Num1))
}
}
#[test]
fn test_get_key_state() {
let mut en = ENIGO.lock().unwrap();
println!(
"[*] test_get_key_state: {:?}",
en.get_key_state(enigo::Key::NumLock)
);
}
}