TolikPylypchuk / SharpHook

SharpHook provides a cross-platform global keyboard and mouse hook, event simulation, and text entry simulation for .NET
https://sharphook.tolik.io
MIT License
347 stars 32 forks source link

SimulateMouseMovementRelative - X does not work, Y does. #98

Closed ZeoWorks closed 6 months ago

ZeoWorks commented 7 months ago

Hi, when using SimulateMouseMovementRelative, The X value always brings the cursor to the far right of the monitor. Whereas the Y value works fine and moves as intended.

inputSimulator.SimulateMouseMovementRelative((short)1,(short)1); ^ Snaps the cursor to the right side of the screen, moves the cursor on Y axis down 1.

TolikPylypchuk commented 7 months ago

Hello! Thanks for posting this issue! Could you please specify which OS you're using? So that I can try to reproduce it.

TolikPylypchuk commented 7 months ago

I've tried reproducing this on Windows and everything works fine for me. Could you please also share a minimal reproducible example?

clFaster commented 6 months ago

I do have the same issue under Windows 11 with two QHD Monitors connected, maybe related #100? Similar behaviour also with SimulateMouseMovement - mouse jumps always to the right edge

TolikPylypchuk commented 6 months ago

Hm, yeah, could be the same issue. I couldn't reproduce it because I've tried it out on a single monitor. Will try again with multiple monitors.

TolikPylypchuk commented 6 months ago

I have fixed the issue and will release a new version with the fix soon.

TolikPylypchuk commented 6 months ago

I've just released version 5.3.3 which fixes this bug, so this issue can be closed.