kwhat / jnativehook

Global keyboard and mouse listeners for Java.
Other
1.75k stars 347 forks source link

Why is the NativeHookThread deliberately NOT a daemon thread? #453

Open cbbravo opened 1 year ago

cbbravo commented 1 year ago

Is there any reason this was made deliberately?

Or would it be acceptable to overload the GlobalScreen.registerNativeHook() method to accept a boolean parameter that gets passed on to NativeHookThread constructor and then to thread.setDaemon()?

kwhat commented 1 year ago

It was deliberate so that a registered hook wouldn't prevent a normal ui based app from existing without uninteresting first.

I believe the original idea was that you can extend the global screen and override whats needed. not sure how feasible that is at this point.