Type Property

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 NSWindow method mouseLocationOutsideOfEventStream. 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

class var pressedMouseButtons: Int

Returns the indices of the currently depressed mouse buttons.

class var doubleClickInterval: TimeInterval

Returns the time, in seconds, in which a second mouse click must occur in order to be considered a double click.

var buttonNumber: Int

The button number for a mouse event.

var clickCount: Int

The number of mouse clicks associated with a mouse-down or mouse-up event.

var associatedEventsMask: NSEvent.EventTypeMask

The associated events mask of a mouse event.