mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-11-24 14:47:46 +00:00
Send navigation, Windows and Menu keys with the extended flag on Windows (#17174)
This commit is contained in:
1 parent
8e1433d4a2
commit
534b047525
1 file changed
+6
@@ -61,6 +61,12 @@ fn keybd_event(mut flags: u32, vk: u16, scan: u16) -> DWORD {
|
||||
LAYOUT = GetKeyboardLayout(current_window_thread_id);
|
||||
}
|
||||
scan = MapVirtualKeyExW(vk as _, 0, LAYOUT) as _;
|
||||
// Without the extended flag, VM consoles and DirectX games read the navigation
|
||||
// keys as the numpad keys that share their scan codes, and VM consoles ignore the
|
||||
// Windows and Menu keys.
|
||||
if matches!(vk, EVK_PRIOR..=EVK_DOWN | EVK_INSERT | EVK_DELETE | EVK_LWIN..=EVK_APPS) {
|
||||
flags |= KEYEVENTF_EXTENDEDKEY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user