Synthesizes a low-level mouse-button event on the local machine.
- macOS 10.0–10.6Deprecated
- Mac Catalyst 13.0–13.0Deprecated
- Core Graphics
The new coordinates of the mouse in global display space.
trueif the on-screen cursor should be moved to the location specified in the
mouseparameter; otherwise, pass
The number of mouse buttons, up to a maximum of 32.
trueto specify that the primary or left mouse button is down; otherwise, pass
Zero or more Boolean values that specify whether the remaining mouse buttons are down (
true) or up (
false). The second value, if any, should specify the state of the secondary mouse button (right). A third value would specify the state of the center button, and the remaining buttons would be in USB device order.
A result code. See the result codes described in Quartz Display Services.
Based on the arguments you pass to this function, the function generates the appropriate mouse-down, mouse-up, mouse-move, or mouse-drag events by comparing the new state with the current state.
This function is not recommended for general use because of undocumented special cases and undesirable side effects. The recommended replacement for this function is
CGEvent, which allows you to create a mouse event and customize the event before posting it to the event system.