Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Use SendInput({ MOUSEINPUT { ... } }) for simulating mouse movement. #90

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

steschu77
Copy link
Contributor

Fix: Use SendInput({ MOUSEINPUT { ... } }) for simulating mouse movement

  • Use SendInput() based mouse cursor positioning during mouse movements (replaces SetCursorPos based positioning)
  • Remove mouse cursor parameters in click events (they were ignored in SendInput() due to missing MOUSEEVENTF_MOVE flag)

Background:
We found that using SetCursorPos for setting the mouse position during mouse movement can lead to unexpected issues. For example, the Windows 'Start Button' context menu (right click on the 'Start Button') will not accept the first mouse click if the mouse was positioned using SetCursorPos.

* Use SendInput() based mouse cursor positioning during mouse movements (replaces SetCursorPos based positioning)
* Remove mouse cursor parameters in click events (they were ignored in SendInput() due to missing MOUSEEVENTF_MOVE flag)
@leexgone leexgone merged commit c3d3bb9 into leexgone:main Dec 2, 2024
leexgone added a commit that referenced this pull request Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants