Fix right ctrl #1166

This commit is contained in:
Asura 2022-08-04 17:26:06 +08:00
parent f1402a14a2
commit 05b157af45
3 changed files with 5 additions and 5 deletions

View File

@ -6,7 +6,7 @@ use crate::common::update_clipboard;
use crate::video_service;
#[cfg(any(target_os = "android", target_os = "ios"))]
use crate::{common::MOBILE_INFO2, mobile::connection_manager::start_channel};
use crate::{ipc, VERSION};
use crate::{ipc};
use hbb_common::{
config::Config,
fs,

View File

@ -1,5 +1,4 @@
use crate::ipc::{self, new_listener, Connection, Data};
use crate::VERSION;
#[cfg(windows)]
use clipboard::{
create_cliprdr_context, empty_clipboard, get_rx_clip_client, server_clip_file, set_conn_enabled,

View File

@ -1189,7 +1189,7 @@ impl Handler {
let alt = get_key_state(enigo::Key::Alt);
#[cfg(windows)]
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 {
if IS_ALT_GR {
if alt || key == RdevKey::AltGr {
@ -1204,8 +1204,8 @@ impl Handler {
tmp
};
#[cfg(not(windows))]
let ctrl = get_key_state(enigo::Key::Control);
let shift = get_key_state(enigo::Key::Shift);
let ctrl = get_key_state(enigo::Key::Control) || get_key_state(enigo::Key::RightControl);
let shift = get_key_state(enigo::Key::Shift) || get_key_state(enigo::Key::RightShift);
#[cfg(windows)]
let command = crate::platform::windows::get_win_key_state();
#[cfg(not(windows))]
@ -1389,6 +1389,7 @@ impl Handler {
if down_or_up == true {
key_event.down = true;
}
dbg!(&key_event);
self.send_key_event(key_event, KeyboardMode::Legacy)
}