PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

Mouse pointer Crosshair & Mouse Jump Issue

Open taxi8675 opened this issue 2 years ago • 3 comments

Microsoft PowerToys version

0.68.0

Installation method

Microsoft Store

Running as admin

Yes

Area(s) with issue?

Mouse Utilities

Steps to reproduce

  1. Turn Mouse pointer Crosshairs & Mouse Jump utilities on
  2. Activate Mouse Jump screen while having crosshairs enabled
  3. Click anywhere to "mouse jump"

✔️ Expected Behavior

Mouse pointer Crosshairs should follow pointer's coordinates after "mouse jump"

❌ Actual Behavior

Mouse pointer Crosshairs stayed in pointer's previous coordinates after "mouse jump"

Other Software

No response

taxi8675 avatar Mar 03 '23 14:03 taxi8675

It updates as soon as you move the mouse, but indeed it doesn't update right after the jump. It's because when we move the cursor there's no actual low level keyboard input to react to. Wonder if we need to fake it.

jaimecbernardo avatar Mar 03 '23 15:03 jaimecbernardo

I assume a SendInput call with MOUSEEVENTF_ABSOLUTE is the way to go here. https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-mouseinput

jaimecbernardo avatar Mar 03 '23 15:03 jaimecbernardo

It’s possible SendInput might make the problem worse with the LittleBigMouse ticket - I think LBM looks for the first mouse event on a new monitor and scales the position and moves the cursor again to its final dpi-scaled position - at the moment Mouse Jump moves the cursor ok with LBM enabled but LBM “skips” it when you move it, whereas it might skip it as part of the Mouse Jump if sees the synthetic SendInput event above, which would mean it would land in the wrong place rather than land, then skip.

Its glitchy behaviour either way, but I guess it depends on what’s least undesirable all round…

I’m happy to take a look if no-one else has started working in this yet…

mikeclayton avatar Mar 03 '23 16:03 mikeclayton

Fixed in 0.69 which was released in the start of April 2023.

crutkas avatar May 08 '23 17:05 crutkas