Reports the current mouse position in screen coordinates.
SDK
- macOS 10.0+
Framework
- App
Kit
Declaration
@property(class, readonly) NSPoint mouseLocation;
Return Value
The current mouse location in screen coordinates.
Discussion
This method is similar to the NSWindow
method mouse
. It returns the location regardless of the current event or pending events. The difference between these methods is that mouse
returns a point in the receiving window’s coordinates, and mouse
returns the same information in screen coordinates.