trivial changes
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
d66ad5e0cb
commit
0d5d073a43
@ -350,6 +350,7 @@ pub fn get_keyboard_mode_enum() -> KeyboardMode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||||
pub fn is_modifier(key: &rdev::Key) -> bool {
|
pub fn is_modifier(key: &rdev::Key) -> bool {
|
||||||
matches!(
|
matches!(
|
||||||
key,
|
key,
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
pub mod platform;
|
pub mod platform;
|
||||||
mod keyboard;
|
mod keyboard;
|
||||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
#[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};
|
pub use platform::{get_cursor, get_cursor_data, get_cursor_pos, start_os_service};
|
||||||
#[cfg(not(any(target_os = "ios")))]
|
#[cfg(not(any(target_os = "ios")))]
|
||||||
/// cbindgen:ignore
|
/// cbindgen:ignore
|
||||||
|
@ -1439,10 +1439,10 @@ pub fn handle_key_(evt: &KeyEvent) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
(Some(key_event::Union::Chr(code)), KeyboardMode::Map | KeyboardMode::Translate) => {
|
(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) {
|
if !skip_led_sync_rdev_key(&key) {
|
||||||
_lock_mode_handler =
|
_lock_mode_handler =
|
||||||
Some(LockModesHandler::new(evt, crate::is_numpad_rdev_key(&key)));
|
Some(LockModesHandler::new(evt, crate::keyboard::is_numpad_rdev_key(&key)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user