kwhat / jnativehook

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

Pointer frozen during debugging #232

Open lawrenceztang opened 6 years ago

lawrenceztang commented 6 years ago

In the following code:

public void nativeMousePressed(NativeMouseEvent e) { mouseClickX = e.getX(); }

A debug breakpoint is at the second line: mouseClickX = e.getX();

In Intellij, the pointer on the screen becomes very hard to move when the breakpoint is hit, making debugging inside the mouse listeners almost impossible.

kwhat commented 5 years ago

Because this library is hooked into the OS's input thread, there is no easy way to work around this issue. The native library needs to detect the Java debugger hook and unregister the global hook to prevent the mouse / keyboard blocking.

mysticdrew commented 3 years ago

Phew, I thought my system was pooping out with this.. Hmm.