kwhat / jnativehook

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

Get native mouse movements #427

Open bartatamas opened 2 years ago

bartatamas commented 2 years ago

Hi,

I need to get native mouse movement events, not screen coordinates. Now I read /dev/input/mice in Linux for this purpose but I'm looking for a platform-independent solution. I tried this library and I see that NativeMouseEvent contains screen coordinates instead of delta movements. I mean if cursor is in top left position and I move mouse to left then native movement is detected well from /dev/input/mice but this library keep sending events with x=0 and y=0. Is it possible somehow to get real delta movements?