debug done

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-03-25 18:23:57 +08:00
parent fa272273a4
commit c0188c8e07
2 changed files with 14 additions and 8 deletions

View File

@@ -70,9 +70,9 @@ lazy_static::lazy_static! {
#[cfg(target_os = "windows")]
let codes = numpad_keys.iter().filter_map(|k| rdev::win_scancode_from_key(*k)).collect();
#[cfg(target_os = "linux")]
let codes = numpad_keys.iter().filter_map(|k| rdev::linux_code_from_code(*k)).collect();
let codes = numpad_keys.iter().filter_map(|k| rdev::linux_keycode_from_key(*k)).collect();
#[cfg(target_os = "macos")]
let codes = numpad_keys.iter().filter_map(|k| rdev::macos_code_from_code(*k)).collect();
let codes = numpad_keys.iter().filter_map(|k| rdev::macos_keycode_from_key(*k)).collect();
Arc::new(codes)
};
}
@@ -905,6 +905,8 @@ fn is_altgr(event: &Event) -> bool {
}
}
#[inline]
#[cfg(any(target_os = "linux", target_os = "windows"))]
fn is_press(event: &Event) -> bool {
matches!(event.event_type, EventType::KeyPress(_))
}