Hide Shortcut Guide when screenshots are taken (#605)

This commit is contained in:
Bartosz Sosnowski
2019-10-31 10:26:24 +01:00
committed by GitHub
parent b767773742
commit e6afd33621
5 changed files with 22 additions and 0 deletions

View File

@@ -11,6 +11,12 @@ bool TargetState::signal_event(unsigned vk_code, bool key_down) {
if (!events.empty() && events.back().key_down == key_down && events.back().vk_code == vk_code) {
return false;
}
// Hide the overlay when WinKey + Shift + S is pressed. 0x53 is the VK code of the S key
if (key_down && state == Shown && vk_code == 0x53 && (GetKeyState(VK_LSHIFT) || GetKeyState(VK_RSHIFT))) {
// We cannot use normal hide() here, there is stuff that needs deinitialization.
// It can be safely done when the user releases the WinKey.
instance->quick_hide();
}
bool supress = false;
if (!key_down && (vk_code == VK_LWIN || vk_code == VK_RWIN) &&
state == Shown &&