Type Property

pressedMouseButtons

Returns the indices of the currently depressed mouse buttons.

Declaration

class var pressedMouseButtons: Int { get }

Return Value

The indices of the currently depressed mouse buttons.

Discussion

A return value of 1 << 0 corresponds to the left mouse button, 1 << 1 corresponds to the right mouse button, 1<< n, n >=2 correspond to other mouse buttons.

This returns the state of devices combined with synthesized events at the moment, independent of which events have been delivered via the event stream, so this method is not suitable for tracking.

See Also

Getting Mouse Event Information

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.

class var mouseLocation: NSPoint

Reports the current mouse position in screen coordinates.

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.