fix: win remote and file transfer , simultaneous connection

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-10-31 10:04:59 +08:00
parent e263acef3e
commit d6c9639c5d
7 changed files with 28 additions and 18 deletions

View File

@@ -725,7 +725,7 @@ fn legacy_keyboard_mode(evt: &KeyEvent) {
// disable numlock if press home etc when numlock is on,
// because we will get numpad value (7,8,9 etc) if not
#[cfg(windows)]
let mut disable_numlock = false;
let mut _disable_numlock = false;
#[cfg(target_os = "macos")]
en.reset_flag();
// When long-pressed the command key, then press and release
@@ -775,8 +775,8 @@ fn legacy_keyboard_mode(evt: &KeyEvent) {
if let Some(key) = KEY_MAP.get(&ck.value()) {
#[cfg(windows)]
if let Some(_) = NUMPAD_KEY_MAP.get(&ck.value()) {
disable_numlock = en.get_key_state(Key::NumLock);
if disable_numlock {
_disable_numlock = en.get_key_state(Key::NumLock);
if _disable_numlock {
en.key_down(Key::NumLock).ok();
en.key_up(Key::NumLock);
}