Returns a new NSEvent object describing a mouse-down, -up, -moved, or -dragged event.
- macOS 10.0+
One of the modifier key masks described in
NSEvent, or an
The cursor location in the base coordinate system of the window specified by
An integer bit field containing any of the modifier key masks described in Getting Unicode Values, combined using the C bitwise OR operator.
The time the event occurred in seconds since system startup.
An integer that identifies the window device associated with the event, which is associated with the
NSWindowthat will receive the event.
The display graphics context of the event.
An identifier for the new event. It’s normally taken from a counter for mouse events, which continually increases as the application runs.
The number of mouse clicks associated with the mouse event.
A value from
1indicating the pressure applied to the input device on a mouse event, used for an appropriate device such as a graphics tablet. For devices that aren’t pressure-sensitive, the value should be either
NSEvent instance or
nil if the instance could not be created.