Skip to content

Comments

Mouse synthesis#157

Open
beefon wants to merge 2 commits intomainfrom
dev/beefon/synthesize-mouse
Open

Mouse synthesis#157
beefon wants to merge 2 commits intomainfrom
dev/beefon/synthesize-mouse

Conversation

@beefon
Copy link
Contributor

@beefon beefon commented Feb 22, 2026

  • Adding VMWindow that renders VM. It is easier to find it in the app, and allows to operate the view hierarchy in less blind manner. It will make sure that VZVirtualMachineView is always first responder. It renders synthesised mouse clicks. It provides the source for screenshotting with and without synthesised mouse clicks visualisation.
  • Implemented mouse clicks in virtual machines. The hacks in the internet do that by running private API to start per-VM VNC server, and then by connecting as VNC client and making clicks using it. It is nice solution and quite predictable. However, we are good citizens on Apple platforms and we tend to not use private API. (Do we?) We already require a window to be present for keyboard synthesis. The only difference is that mouse clicks are not delivered to the window if app is not active, which is rather disappointing. So the app becomes active in order to issue synthesised mouse clicks. I've tried to use CGEvents - it didn't work as well. Even when I tried to use accessibility to make clicks, it still didn't work unless the app is active.

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.

1 participant