From b76777374246c1c619fb524ca80cc3b657f705fa Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Wed, 30 Oct 2019 11:14:12 +0100 Subject: [PATCH] ShortcutGuide: change vk_code to suppress Start Use reserved 0xCF virtual key-code to suppress the Start menu from appearing instead of 0x07 which is used by the Xbox Controller for the Xbox Guide button. Fixes: https://github.com/microsoft/PowerToys/issues/595 --- src/modules/shortcut_guide/target_state.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/shortcut_guide/target_state.cpp b/src/modules/shortcut_guide/target_state.cpp index 17c9465274..c8e8f844b2 100644 --- a/src/modules/shortcut_guide/target_state.cpp +++ b/src/modules/shortcut_guide/target_state.cpp @@ -23,14 +23,14 @@ bool TargetState::signal_event(unsigned vk_code, bool key_down) { cv.notify_one(); if (supress) { // Send a fake key-stroke to prevent the start menu from appearing. - // We use 0x07 VK code, which is undefined. It still prevents the + // We use 0xCF VK code, which is reserved. It still prevents the // start menu from appearing, but should not interfere with any // keyboard shortcuts. INPUT input[3] = { {},{},{} }; input[0].type = INPUT_KEYBOARD; - input[0].ki.wVk = 0x07; + input[0].ki.wVk = 0xCF; input[1].type = INPUT_KEYBOARD; - input[1].ki.wVk = 0x07; + input[1].ki.wVk = 0xCF; input[1].ki.dwFlags = KEYEVENTF_KEYUP; input[2].type = INPUT_KEYBOARD; input[2].ki.wVk = VK_LWIN;