From d2201cbb791db4f1e1f14b9ae7ecd2dc6b10f81d Mon Sep 17 00:00:00 2001 From: Enrico Giordani Date: Tue, 22 Sep 2020 13:12:19 +0200 Subject: [PATCH] [SG] change suppress key code (#6750) --- src/modules/shortcut_guide/target_state.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/modules/shortcut_guide/target_state.cpp b/src/modules/shortcut_guide/target_state.cpp index 8cb81fe3eb..bf0f14a125 100644 --- a/src/modules/shortcut_guide/target_state.cpp +++ b/src/modules/shortcut_guide/target_state.cpp @@ -39,16 +39,14 @@ bool TargetState::signal_event(unsigned vk_code, bool key_down) cv.notify_one(); if (suppress_win_release) { - // Send a fake key-stroke to prevent the start menu from appearing. - // We use 0xCF VK code, which is reserved. It still prevents the - // start menu from appearing, but should not interfere with any - // keyboard shortcuts. + // Send a 0xFF VK code, which is outside of the VK code range, to prevent + // the start menu from appearing. INPUT input[3] = { {}, {}, {} }; input[0].type = INPUT_KEYBOARD; - input[0].ki.wVk = 0xCF; + input[0].ki.wVk = 0xFF; input[0].ki.dwExtraInfo = CommonSharedConstants::KEYBOARDMANAGER_INJECTED_FLAG; input[1].type = INPUT_KEYBOARD; - input[1].ki.wVk = 0xCF; + input[1].ki.wVk = 0xFF; input[1].ki.dwFlags = KEYEVENTF_KEYUP; input[1].ki.dwExtraInfo = CommonSharedConstants::KEYBOARDMANAGER_INJECTED_FLAG; input[2].type = INPUT_KEYBOARD;