Hi, I am displaying the running linux ubuntu VM in VzVirtualMachineView. I wouldl like to simulate right click by calling vZVirtualMachineView.rightMouseDown to trigger right click on the guest. I tried it and it does not work. For mac os guests it is working. For linux guests it is not working
Any help would be appreciated to fix the issue.
Apple asked me to use cgevent like this
guard let cgEvent = CGEvent(mouseEventSource: nil, mouseType: .rightMouseDown, mouseCursorPosition: cgPoint, mouseButton: .right) else {
return
}
// Create the synthetic NSEvent from the CGEvent.
guard let event = NSEvent(cgEvent: cgEvent) else {
return
}
virtualMachineView.rightMouseDown(with: event)