fix conflict
This commit is contained in:
parent
82a7554be1
commit
77125b7a98
@ -10,7 +10,9 @@ use crate::ui::CUR_SESSION;
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
use hbb_common::log;
|
||||
use hbb_common::message_proto::*;
|
||||
use rdev::{Event, EventType, Key, KeyCode};
|
||||
#[cfg(any(target_os = "windows", target_os = "macos"))]
|
||||
use rdev::KeyCode;
|
||||
use rdev::{Event, EventType, Key};
|
||||
#[cfg(any(target_os = "windows", target_os = "macos"))]
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::{
|
||||
@ -892,15 +894,6 @@ fn is_press(event: &Event) -> bool {
|
||||
matches!(event.event_type, EventType::KeyPress(_))
|
||||
}
|
||||
|
||||
fn is_numpad_key(event: &Event) -> bool {
|
||||
matches!(event.event_type, EventType::KeyPress(key) | EventType::KeyRelease(key) if match key {
|
||||
Key::Kp0 | Key::Kp1 | Key::Kp2 | Key::Kp3| Key::Kp4| Key::Kp5| Key::Kp6|
|
||||
Key::Kp7| Key::Kp8| Key::Kp9 | Key::KpMinus | Key::KpMultiply |
|
||||
Key::KpDivide | Key::KpPlus | Key::KpDecimal => true,
|
||||
_ => false
|
||||
})
|
||||
}
|
||||
|
||||
pub fn translate_keyboard_mode(peer: &str, event: &Event, key_event: KeyEvent) -> Vec<KeyEvent> {
|
||||
let mut events: Vec<KeyEvent> = Vec::new();
|
||||
if let Some(unicode_info) = &event.unicode {
|
||||
|
Loading…
x
Reference in New Issue
Block a user