Merge pull request #4123 from fufesou/fix/translate_mode_release_scan

win, translate mode, release scancode
This commit is contained in:
RustDesk 2023-04-20 19:26:39 +08:00 committed by GitHub
commit 4e54ac86f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

2
Cargo.lock generated
View File

@ -4840,7 +4840,7 @@ dependencies = [
[[package]]
name = "rdev"
version = "0.5.0-2"
source = "git+https://github.com/fufesou/rdev#2b9d473dfd9a49649627f0684f49e920494837e2"
source = "git+https://github.com/fufesou/rdev#f43a42fbedf1234a4bc132581790d63c9a2c8f92"
dependencies = [
"cocoa",
"core-foundation 0.9.3",

View File

@ -1292,7 +1292,8 @@ fn simulate_win2win_hotkey(code: u32, down: bool) {
}
let keycode: u16 = ((code >> 16) & 0x0000FFFF) as u16;
allow_err!(rdev::simulate_code(Some(keycode), None, down));
let scan = rdev::vk_to_scancode(keycode as _);
allow_err!(rdev::simulate_code(None, Some(scan), down));
}
#[cfg(not(any(target_os = "windows", target_os = "linux")))]