[FancyZones] Improve code quality (part 1: moved utils) (#23028)

This commit is contained in:
Seraphima Zykova
2023-01-17 13:50:40 +03:00
committed by GitHub
parent 047d5987c4
commit 87743e8e5d
9 changed files with 94 additions and 83 deletions

View File

@@ -273,4 +273,13 @@ namespace FancyZonesUtils
return windowRect;
}
void SwallowKey(const WORD key) noexcept
{
INPUT inputKey[1] = {};
inputKey[0].type = INPUT_KEYBOARD;
inputKey[0].ki.wVk = key;
inputKey[0].ki.dwFlags = KEYEVENTF_KEYUP;
SendInput(1, inputKey, sizeof(INPUT));
}
}