This adds an option specific to win32 which introduces a new filter.
The existing filter either suppresses the event early in case of raise ..., or ignores the event and passes it on in case of return False (the comment # Suppress further propagation of the event if it is filtered is plain wrong)
The new filter suppresses events after they have been enqueued.
This adds an option specific to win32 which introduces a new filter.
The existing filter either suppresses the event early in case of
raise ...
, or ignores the event and passes it on in case ofreturn False
(the comment# Suppress further propagation of the event if it is filtered
is plain wrong)The new filter suppresses events after they have been enqueued.
This allows suppression of injected events as demonstrated in https://gitlab.com/notEvil/keyboard/-/blob/a868e952787d0a779b129f9382c00d907fc16a2a/keyboard/windows/evdev/__init__.py#L32 and might solve issues like https://github.com/moses-palmer/pynput/issues/455.
Feel free to adjust names and code style