How to suppress events when async? #96
-
|
I'm trying to figure out how to suppress events when running the hook async, but with no luck. If it isn't possible, how would I do it without async, but still not have it block my applications main thread? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
|
Hello! Thanks for asking! In order to have the ability to suppress events you need to use It doesn't matter if you use Also, please note that suppressing events works only on Windows and macOS, it doesn't work on Linux. |
Beta Was this translation helpful? Give feedback.
Hello! Thanks for asking!
In order to have the ability to suppress events you need to use
SimpleGlobalHook-TaskPoolGlobalHookdoesn't support suppressing events since it runs event handlers on other threads.It doesn't matter if you use
RunorRunAsyncto run the global hook -SimpleGlobalHookallows suppressing events either way.Also, please note that suppressing events works only on Windows and macOS, it doesn't work on Linux.