boppreh / keyboard

Hook and simulate global keyboard events on Windows and Linux.
MIT License
3.76k stars 433 forks source link

Suppress' Windows key for native Windows Shortcuts #572

Open fregapple opened 1 year ago

fregapple commented 1 year ago

Hi there!

I am putting together a hot key script that runs in the background where you only have to add your hotkeys to a json file and reload for them to work all the time.

Although working great, I have noticed one issue.

If I have:

keyboard.add_hotkey('windows+z', print, args=('blah',), suppress=True)

Then I can not use windows + r to open run, for example.

If I remove the Suppress value / make it False, then it works as expected. However, then system hotkeys work in tandem.

Is this how it was intended? I was hoping that if you created a hotkey like lets say "windows+r" and then added the suppress, it would only override that windows shortcut, but other shortcuts like 'windows+x' would still work as they aren't overridden.

Or is this just how it was intended for the suppress to work? to remove all Windows key shortcuts to then rebind them to our new ones?