Open mwss1996 opened 7 years ago
Interesting. No idea why this happens yet... According to the Windows documentation raw input should be a plain "listener". Blocking inputs isn't possible. Strange...
hope you can figure it out. I have no ideia.
I've been having the same problem with JavaFX text fields, the problem fixes itself once the parameter is changed to 'false', but I hope you can fix the problem!
If raw input is not required, the it's fine to leave the parameter remain false
. I can reproduce the problem for both JavaFX and Swing/AWT. Seems strange to me... I hope Java doesn't register a raw input hook itself, otherwise it might runs into problem, as both share the same process ID to register the window handle... Just a wild guess. I hope I can look into this tomorrow.
Hello kristian!
This problem occurred here too. Have you found any reason for the bug? Do you know any drawback using the hook with raw=false
?
I'm using win10 prof 1703 and java1.8_144 with JavaFx, if that helps.
Thanks!
I have been using the SYS in combination with LWJGL api (for the rendering part of my application), and have faced the same issue, where the window just froze when trying to collect input with raw mode. Switching from true to false in the constructor for GlobalMouseHook resolved the issue.
Apparently, it's possible to register hotkey without window resources: https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-registerhotkey The hwnd parameter is optional. Maybe that helps. If you need the window resource for some reason, maybe add a default mode that is not using it, and an extended mode that can be activated by the user but tells him it may not work.
same problem for me... please fix it ;-;
I've been having the same problem ....
Hello @kristian just stumbled across your library and this issue...could it perhaps be related to not calling DefRawInputProc(&input, 1, sizeof(RAWINPUTHEADER));
after GetRawInputData(...)
?
See the post here where the author states,
Finally, we call DefRawInputProc to allow default processing to occur. This lets the keypress enter the normal input system.
Good catch @KOConchobhair and would fit the issue quite well. Unfortunately no success on my side... I added it anyways in c9463895324c5b467f0b8535dbd90a440006645d / 3.8, as I think it's good to have it in. The issue w/ Java is still not solved though... Shame.
If I instantiate the GlobalKeyboardHook, with a true parameter, my application stops to recieve the key events. The same with GlobalMouseHook, but for mouse events.
I am writing a Swing application, but I have tested the issue with JavaFX to confirm if it was not a Swing specifc problem.
As example, the below JavaFX application becomes unusable: