From 1ce3b3797a8f5a1cf7b28490e66ef500ed8b4307 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Mon, 13 Nov 2017 16:17:28 +0100 Subject: [PATCH] Handle Ctrl+Alt+Delete in raw keyboard mode Ctrl+Alt+Delete requires special handling to trigger on Windows. Make sure this works in raw keyboard mode as well. --- win/rfb_win32/SInput.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/win/rfb_win32/SInput.cxx b/win/rfb_win32/SInput.cxx index e6da9b84..d41e14bc 100644 --- a/win/rfb_win32/SInput.cxx +++ b/win/rfb_win32/SInput.cxx @@ -377,6 +377,14 @@ void win32::SKeyboard::keyEvent(rdr::U32 keysym, rdr::U32 keycode, bool down) if ((keycode == 0x54) && !(GetAsyncKeyState(VK_MENU) & 0x8000)) keycode = 0xb7; + if (down && (keycode == 0xd3) && + ((GetAsyncKeyState(VK_CONTROL) & 0x8000) != 0) && + ((GetAsyncKeyState(VK_MENU) & 0x8000) != 0)) + { + rfb::win32::emulateCtrlAltDel(); + return; + } + doScanCodeEvent(keycode, down); return; } -- 2.39.5