mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-18 06:29:44 +08:00
Changed flags for newly pressed key after invoking shortcut
This commit is contained in:
parent
282e0adfe2
commit
ac2a9deb75
@ -459,15 +459,15 @@ namespace KeyboardEventHandlers
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// key down for original shortcut action key
|
// key down for original shortcut action key with shortcut flag so that we don't invoke the same shortcut remap again
|
||||||
if (isActionKeyPressed)
|
if (isActionKeyPressed)
|
||||||
{
|
{
|
||||||
KeyboardManagerHelper::SetKeyEvent(keyEventList, i, INPUT_KEYBOARD, (WORD)it.first.GetActionKey(), 0, KeyboardManagerConstants::KEYBOARDMANAGER_SHORTCUT_FLAG);
|
KeyboardManagerHelper::SetKeyEvent(keyEventList, i, INPUT_KEYBOARD, (WORD)it.first.GetActionKey(), 0, KeyboardManagerConstants::KEYBOARDMANAGER_SHORTCUT_FLAG);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send current key pressed
|
// Send current key pressed without shortcut flag so that it can be reprocessed in case the physical keys pressed are a different remapped shortcut
|
||||||
KeyboardManagerHelper::SetKeyEvent(keyEventList, i, INPUT_KEYBOARD, (WORD)data->lParam->vkCode, 0, KeyboardManagerConstants::KEYBOARDMANAGER_SHORTCUT_FLAG);
|
KeyboardManagerHelper::SetKeyEvent(keyEventList, i, INPUT_KEYBOARD, (WORD)data->lParam->vkCode, 0, 0);
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
// Send dummy key since the current key pressed could be a modifier
|
// Send dummy key since the current key pressed could be a modifier
|
||||||
@ -541,15 +541,15 @@ namespace KeyboardEventHandlers
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// key down for original shortcut action key
|
// key down for original shortcut action key with shortcut flag so that we don't invoke the same shortcut remap again
|
||||||
if (isActionKeyPressed)
|
if (isActionKeyPressed)
|
||||||
{
|
{
|
||||||
KeyboardManagerHelper::SetKeyEvent(keyEventList, i, INPUT_KEYBOARD, (WORD)it.first.GetActionKey(), 0, KeyboardManagerConstants::KEYBOARDMANAGER_SHORTCUT_FLAG);
|
KeyboardManagerHelper::SetKeyEvent(keyEventList, i, INPUT_KEYBOARD, (WORD)it.first.GetActionKey(), 0, KeyboardManagerConstants::KEYBOARDMANAGER_SHORTCUT_FLAG);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send current key pressed
|
// Send current key pressed without shortcut flag so that it can be reprocessed in case the physical keys pressed are a different remapped shortcut
|
||||||
KeyboardManagerHelper::SetKeyEvent(keyEventList, i, INPUT_KEYBOARD, (WORD)data->lParam->vkCode, 0, KeyboardManagerConstants::KEYBOARDMANAGER_SHORTCUT_FLAG);
|
KeyboardManagerHelper::SetKeyEvent(keyEventList, i, INPUT_KEYBOARD, (WORD)data->lParam->vkCode, 0, 0);
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
// Send dummy key
|
// Send dummy key
|
||||||
|
Loading…
Reference in New Issue
Block a user