Closed zhecks closed 1 year ago
Describe the bug send mouse event by CGEventPostToPid to an application which listen mouse click event,but it seems not work
Platform information
Python 3.9.10 homebrew macOS Big Sur 11.6
To Reproduce event = Quartz.CGEventCreateMouseEvent(None, Quartz.kCGEventLeftMouseDown, (0, 0), Quartz.kCGMouseButtonLeft) Quartz.CGEventPostToPid(6935, event)
event = Quartz.CGEventCreateMouseEvent(None, Quartz.kCGEventLeftMouseDown, (0, 0), Quartz.kCGMouseButtonLeft) Quartz.CGEventPostToPid(6935, event)
Expected behavior the application will print mouse click
Additional context no error return for pyobjc
i look this discussion https://stackoverflow.com/questions/42657655/how-to-send-mouse-click-event-to-a-window-in-mac-osx
Looking at that SO article the problem isn't in PyObjC, but is due to a macOS feature.
Describe the bug send mouse event by CGEventPostToPid to an application which listen mouse click event,but it seems not work
Platform information
Python 3.9.10 homebrew macOS Big Sur 11.6
To Reproduce
event = Quartz.CGEventCreateMouseEvent(None, Quartz.kCGEventLeftMouseDown, (0, 0), Quartz.kCGMouseButtonLeft) Quartz.CGEventPostToPid(6935, event)
Expected behavior the application will print mouse click
Additional context no error return for pyobjc