mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-01-18 07:43:01 +08:00
Fix right ctrl #1166
This commit is contained in:
parent
f1402a14a2
commit
05b157af45
@ -6,7 +6,7 @@ use crate::common::update_clipboard;
|
|||||||
use crate::video_service;
|
use crate::video_service;
|
||||||
#[cfg(any(target_os = "android", target_os = "ios"))]
|
#[cfg(any(target_os = "android", target_os = "ios"))]
|
||||||
use crate::{common::MOBILE_INFO2, mobile::connection_manager::start_channel};
|
use crate::{common::MOBILE_INFO2, mobile::connection_manager::start_channel};
|
||||||
use crate::{ipc, VERSION};
|
use crate::{ipc};
|
||||||
use hbb_common::{
|
use hbb_common::{
|
||||||
config::Config,
|
config::Config,
|
||||||
fs,
|
fs,
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
use crate::ipc::{self, new_listener, Connection, Data};
|
use crate::ipc::{self, new_listener, Connection, Data};
|
||||||
use crate::VERSION;
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
use clipboard::{
|
use clipboard::{
|
||||||
create_cliprdr_context, empty_clipboard, get_rx_clip_client, server_clip_file, set_conn_enabled,
|
create_cliprdr_context, empty_clipboard, get_rx_clip_client, server_clip_file, set_conn_enabled,
|
||||||
|
@ -1189,7 +1189,7 @@ impl Handler {
|
|||||||
let alt = get_key_state(enigo::Key::Alt);
|
let alt = get_key_state(enigo::Key::Alt);
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
let ctrl = {
|
let ctrl = {
|
||||||
let mut tmp = get_key_state(enigo::Key::Control);
|
let mut tmp = get_key_state(enigo::Key::Control) || get_key_state(enigo::Key::RightControl);
|
||||||
unsafe {
|
unsafe {
|
||||||
if IS_ALT_GR {
|
if IS_ALT_GR {
|
||||||
if alt || key == RdevKey::AltGr {
|
if alt || key == RdevKey::AltGr {
|
||||||
@ -1204,8 +1204,8 @@ impl Handler {
|
|||||||
tmp
|
tmp
|
||||||
};
|
};
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
let ctrl = get_key_state(enigo::Key::Control);
|
let ctrl = get_key_state(enigo::Key::Control) || get_key_state(enigo::Key::RightControl);
|
||||||
let shift = get_key_state(enigo::Key::Shift);
|
let shift = get_key_state(enigo::Key::Shift) || get_key_state(enigo::Key::RightShift);
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
let command = crate::platform::windows::get_win_key_state();
|
let command = crate::platform::windows::get_win_key_state();
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
@ -1389,6 +1389,7 @@ impl Handler {
|
|||||||
if down_or_up == true {
|
if down_or_up == true {
|
||||||
key_event.down = true;
|
key_event.down = true;
|
||||||
}
|
}
|
||||||
|
dbg!(&key_event);
|
||||||
self.send_key_event(key_event, KeyboardMode::Legacy)
|
self.send_key_event(key_event, KeyboardMode::Legacy)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user