Handle RAlt, RCtrl and other extended keys correctly (dev/build-features) (#2145)

* Fixed SendInput for RAlt and RCtrl

* Fixed shortcuts containing Del, Arrow keys, etc
This commit is contained in:
Arjun Balgovind
2020-04-16 15:17:57 -07:00
committed by GitHub
parent 10c0325f18
commit 13a8ac3e50
4 changed files with 26 additions and 3 deletions

View File

@@ -152,7 +152,7 @@ public:
PowerToysSettings::CustomActionObject::from_json_string(action);
HINSTANCE hInstance = reinterpret_cast<HINSTANCE>(&__ImageBase);
if (action_object.get_name() == L"RemapKeyboard")
if (action_object.get_name() == L"RemapKeyboard")
{
if (!CheckEditKeyboardWindowActive())
{
@@ -325,6 +325,10 @@ public:
keyEventArray[index].type = inputType;
keyEventArray[index].ki.wVk = keyCode;
keyEventArray[index].ki.dwFlags = flags;
if (isExtendedKey(keyCode))
{
keyEventArray[index].ki.dwFlags |= KEYEVENTF_EXTENDEDKEY;
}
keyEventArray[index].ki.dwExtraInfo = extraInfo;
}