Fixed KBM interaction with Shortcut Guide (#2220)

This commit is contained in:
Arjun Balgovind
2020-04-21 10:25:14 -07:00
committed by GitHub
parent 93752fb6cb
commit b715a008c5
5 changed files with 19 additions and 3 deletions

View File

@@ -2,6 +2,7 @@
#include "target_state.h"
#include "common/start_visible.h"
#include "keyboard_state.h"
#include "common/shared_constants.h"
TargetState::TargetState(int ms_delay) :
delay(std::chrono::milliseconds(ms_delay)), thread(&TargetState::thread_proc, this)
@@ -42,12 +43,15 @@ bool TargetState::signal_event(unsigned vk_code, bool key_down)
INPUT input[3] = { {}, {}, {} };
input[0].type = INPUT_KEYBOARD;
input[0].ki.wVk = 0xCF;
input[0].ki.dwExtraInfo = CommonSharedConstants::KEYBOARDMANAGER_INJECTED_FLAG;
input[1].type = INPUT_KEYBOARD;
input[1].ki.wVk = 0xCF;
input[1].ki.dwFlags = KEYEVENTF_KEYUP;
input[1].ki.dwExtraInfo = CommonSharedConstants::KEYBOARDMANAGER_INJECTED_FLAG;
input[2].type = INPUT_KEYBOARD;
input[2].ki.wVk = VK_LWIN;
input[2].ki.dwFlags = KEYEVENTF_KEYUP;
input[2].ki.dwExtraInfo = CommonSharedConstants::KEYBOARDMANAGER_INJECTED_FLAG;
SendInput(3, input, sizeof(INPUT));
}
return supress;