Description
If two hotkeys are setup, one to activate when pressing shift+q, the other by pressing only q, the behaviour expected by the user is that pressing shift+q will trigger the shift+q hotkey but NOT the q only hotkey. However, using pynput global hotkeys, BOTH hotkeys are triggered.
Another common expected behaviour in hotkeys is that pressing modifiers keys should not trigger the hotkey. For example, pressing ctrl+c to copy and ctrl+v to paste are usual hotkeys. However, when pressing c+ctrl (in that order), the user doesn't expect the hotkey to be triggered.
Platform and pynput version
Windows, latest
To Reproduce
Create global hotkeys and perform the actions described above.
Proposed fix
I have a partial fix ready that modifies the press method of the hotkey class. Does this repo accept pull requests ?
The fix consists in modifying the _on_press method of the Hotkey class to behave according to the specified expected behaviors.
Description If two hotkeys are setup, one to activate when pressing shift+q, the other by pressing only q, the behaviour expected by the user is that pressing shift+q will trigger the shift+q hotkey but NOT the q only hotkey. However, using pynput global hotkeys, BOTH hotkeys are triggered.
Another common expected behaviour in hotkeys is that pressing modifiers keys should not trigger the hotkey. For example, pressing ctrl+c to copy and ctrl+v to paste are usual hotkeys. However, when pressing c+ctrl (in that order), the user doesn't expect the hotkey to be triggered.
Platform and pynput version Windows, latest
To Reproduce Create global hotkeys and perform the actions described above.
Proposed fix I have a partial fix ready that modifies the press method of the hotkey class. Does this repo accept pull requests ? The fix consists in modifying the _on_press method of the Hotkey class to behave according to the specified expected behaviors.