Skip to content
Discussion options

You must be logged in to vote

Hi! Thanks for asking!

Yes, suppressing input events is possible, but I guess it's not quite clear. The HookEventArgs class contains the Reserved property which you can use to suppress an event:

e.Reserved = EventReservedValueMask.SuppressEvent;

In the next version I'll probably introduce a new property like SuppressEvent or something like that so it'll be more clear.

Bear in mind that suppressing events only works on Windows and macOS - it doesn't work on Linux. Also, it must be done in a synchronous event handler, so you need to use SimpleGlobalHook instead of TaskPoolGlobalHook. If you want to know why then you can read more here.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by TolikPylypchuk
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants