[SG] change suppress key code (#6750)

This commit is contained in:
Enrico Giordani
2020-09-22 13:12:19 +02:00
committed by GitHub
parent 934949725b
commit d2201cbb79

View File

@@ -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;