mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 09:46:54 +02:00
[MWB]Fix keyboard hook capturing shortcuts with unneeded modifier keys (#26763)
* Fixing keyboard hook eagerness. capture ctrl+alt keys only if shift and win are NOT pressed. * Update src/modules/MouseWithoutBorders/App/Class/InputHook.cs
This commit is contained in:
@@ -561,6 +561,13 @@ namespace MouseWithoutBorders.Class
|
||||
Common.MainForm.Quit(false, false);
|
||||
});
|
||||
}
|
||||
else if (shiftDown || winDown)
|
||||
{
|
||||
// The following else cases should work if control and alt modifiers are pressed. The hotkeys should still be captured.
|
||||
// But if any of the other 2 modifiers (shift or win) are pressed, they hotkeys should not be activated.
|
||||
// Issue #26597
|
||||
return true;
|
||||
}
|
||||
else if (vkCode == Setting.Values.HotKeySwitchMachine ||
|
||||
vkCode == Setting.Values.HotKeySwitchMachine + 1 ||
|
||||
vkCode == Setting.Values.HotKeySwitchMachine + 2 ||
|
||||
|
||||
Reference in New Issue
Block a user