Constants that are masks for the events defined in NSEvent.EventType.


struct EventTypeMask


Pass these constants to the NSCell method sendAction(on:) to specify when an NSCell object should send its action message.


Event Types

static var gesture: NSEvent.EventTypeMask

Corresponds to NSEventTypeGesture.

static var magnify: NSEvent.EventTypeMask

Corresponds to NSEventTypeMagnify.

static var swipe: NSEvent.EventTypeMask

Corresponds to NSEventTypeSwipe.

static var rotate: NSEvent.EventTypeMask

Corresponds to NSEventTypeRotate.

static var beginGesture: NSEvent.EventTypeMask

Corresponds to NSEventTypeBeginGesture.

static var endGesture: NSEvent.EventTypeMask

Corresponds to NSEventTypeEndGesture.

static var smartMagnify: NSEvent.EventTypeMask

An event type for the smart zoom gesture (two-finger double tap on trackpads) along with a corresponding NSResponder method. In response to this event, you should magnify the content appropriately for your app. For example, you might zoom in on a specific paragraph or image.

static var pressure: NSEvent.EventTypeMask

An NSEvent type representing a change in pressure on a pressure-sensitive device. Requires a 64-bit processor.

static var directTouch: NSEvent.EventTypeMask

An event mask for touch events, for use with NSTouchBar objects. Corresponds to the NSEvent.EventType.directTouch constant.


init(type: NSEvent.EventType)

Returns the event mask for the specified type.


Conforms To

See Also

Getting the Event Type

var type: NSEvent.EventType

The event’s type.

enum NSEvent.EventType

Various types of events.

var subtype: NSEvent.EventSubtype

The event’s subtype.

enum NSEvent.EventSubtype

Subtypes for various types of events.

var modifierFlags: NSEvent.ModifierFlags

An integer bit field indicating the event’s modifier keys.