mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
@@ -1,6 +1,3 @@
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
use crate::client::get_key_state;
|
||||
use crate::common::GrabState;
|
||||
#[cfg(feature = "flutter")]
|
||||
use crate::flutter::{CUR_SESSION_ID, SESSIONS};
|
||||
#[cfg(target_os = "windows")]
|
||||
@@ -8,6 +5,8 @@ use crate::platform::windows::{get_char_from_vk, get_unicode_from_vk};
|
||||
#[cfg(not(any(feature = "flutter", feature = "cli")))]
|
||||
use crate::ui::CUR_SESSION;
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
use crate::{client::get_key_state, common::GrabState};
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
use hbb_common::log;
|
||||
use hbb_common::message_proto::*;
|
||||
#[cfg(any(target_os = "windows", target_os = "macos"))]
|
||||
@@ -15,10 +14,11 @@ use rdev::KeyCode;
|
||||
use rdev::{Event, EventType, Key};
|
||||
#[cfg(any(target_os = "windows", target_os = "macos"))]
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
use std::time::SystemTime;
|
||||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
sync::{Arc, Mutex},
|
||||
time::SystemTime,
|
||||
};
|
||||
|
||||
#[cfg(windows)]
|
||||
@@ -73,6 +73,7 @@ pub mod client {
|
||||
super::start_grab_loop();
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
pub fn change_grab_status(state: GrabState) {
|
||||
match state {
|
||||
GrabState::Ready => {}
|
||||
@@ -320,6 +321,7 @@ pub fn is_long_press(event: &Event) -> bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
pub fn release_remote_keys() {
|
||||
// todo!: client quit suddenly, how to release keys?
|
||||
let to_release = TO_RELEASE.lock().unwrap().clone();
|
||||
@@ -565,6 +567,7 @@ pub fn event_to_key_events(
|
||||
key_events
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
pub fn event_type_to_event(event_type: EventType) -> Event {
|
||||
Event {
|
||||
event_type,
|
||||
|
||||
Reference in New Issue
Block a user