Contents

mouseLocation

Reports the current mouse position in screen coordinates.

Declaration

class var mouseLocation: NSPoint { get }

Return Value

The current mouse location in screen coordinates.

Discussion

This method is similar to the mouseLocationOutsideOfEventStream method of NSWindow. It returns the location regardless of the current event or pending events. The difference between these methods is that mouseLocationOutsideOfEventStream returns a point in the receiving window’s coordinates, and mouseLocation returns the same information in screen coordinates.

See Also

Getting mouse event information