moses-palmer / pynput

Sends virtual input commands
GNU Lesser General Public License v3.0
1.77k stars 245 forks source link

Blocking a hotkey with multiple keys #469

Closed bd-charu closed 2 years ago

bd-charu commented 2 years ago

Hello, I'm using win32_event_filter to disable certain keys but this only disables one key. Is it possible to have it for key combinations like Ctrl+R

moses-palmer commented 2 years ago

Hello,

The Windows API only allows for clicking a single event. However, of you maintain state in your listener to keep track of whether any ctrl key is pressed, you could block the m event.