mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 02:06:36 +02:00
Add support for shortcuts with >2 keys (dev/keyboardManager) (#1697)
* Added check keyboard state function * Added keyboard state check to avoid n-key shortcuts being affected by 2 key shortcuts * Added support for n key shortcuts in backend and UI * Added a fix to ensure mouse buttons states are not checked * reverted some debugging changes * reverted some debugging changes
This commit is contained in:
committed by
Udit Singh
parent
b713083574
commit
90ddcb30bf
@@ -140,8 +140,8 @@ void createEditShortcutsWindow(HINSTANCE hInst, KeyboardManagerState& keyboardMa
|
||||
std::vector<DWORD> originalKeys = convertWStringVectorToIntegerVector<DWORD>(splitwstring(originalShortcut.c_str(), L' '));
|
||||
std::vector<WORD> newKeys = convertWStringVectorToIntegerVector<WORD>(splitwstring(newShortcut.c_str(), L' '));
|
||||
|
||||
// Check if number of keys is two since only that is currently implemented
|
||||
if (originalKeys.size() == 2 && newKeys.size() == 2)
|
||||
// Shortcut should consist of atleast two keys
|
||||
if (originalKeys.size() > 1 && newKeys.size() > 1)
|
||||
{
|
||||
keyboardManagerState.AddOSLevelShortcut(originalKeys, newKeys);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user