mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-13 19:47:17 +00:00
allow swap key
This commit is contained in:
@@ -36,6 +36,7 @@ pub struct Session<T: InvokeUiSession> {
|
||||
pub sender: Arc<RwLock<Option<mpsc::UnboundedSender<Data>>>>,
|
||||
pub thread: Arc<Mutex<Option<std::thread::JoinHandle<()>>>>,
|
||||
pub ui_handler: T,
|
||||
pub allow_swap_key: bool,
|
||||
}
|
||||
|
||||
impl<T: InvokeUiSession> Session<T> {
|
||||
@@ -505,6 +506,15 @@ impl<T: InvokeUiSession> Session<T> {
|
||||
shift: bool,
|
||||
command: bool,
|
||||
) {
|
||||
#[cfg(target_os = "macos")]
|
||||
let (ctrl, command) =
|
||||
if self.allow_swap_key {
|
||||
(command, ctrl)
|
||||
}
|
||||
else {
|
||||
(ctrl, command)
|
||||
};
|
||||
|
||||
#[allow(unused_mut)]
|
||||
let mut command = command;
|
||||
#[cfg(windows)]
|
||||
|
||||
Reference in New Issue
Block a user