trivial changes

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2023-04-08 20:28:34 +08:00
parent d66ad5e0cb
commit 0d5d073a43
3 changed files with 3 additions and 4 deletions

View File

@ -350,6 +350,7 @@ pub fn get_keyboard_mode_enum() -> KeyboardMode {
}
#[inline]
#[cfg(not(any(target_os = "android", target_os = "ios")))]
pub fn is_modifier(key: &rdev::Key) -> bool {
matches!(
key,

View File

@ -3,8 +3,6 @@
pub mod platform;
mod keyboard;
#[cfg(not(any(target_os = "android", target_os = "ios")))]
pub use keyboard::{keycode_to_rdev_key, is_numpad_rdev_key, is_letter_rdev_key};
#[cfg(not(any(target_os = "android", target_os = "ios")))]
pub use platform::{get_cursor, get_cursor_data, get_cursor_pos, start_os_service};
#[cfg(not(any(target_os = "ios")))]
/// cbindgen:ignore

View File

@ -1439,10 +1439,10 @@ pub fn handle_key_(evt: &KeyEvent) {
}
}
(Some(key_event::Union::Chr(code)), KeyboardMode::Map | KeyboardMode::Translate) => {
let key = crate::keycode_to_rdev_key(*code);
let key = crate::keyboard::keycode_to_rdev_key(*code);
if !skip_led_sync_rdev_key(&key) {
_lock_mode_handler =
Some(LockModesHandler::new(evt, crate::is_numpad_rdev_key(&key)));
Some(LockModesHandler::new(evt, crate::keyboard::is_numpad_rdev_key(&key)));
}
}
_ => {}