Structure

NSEvent.EventTypeMask

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

Declaration

struct EventTypeMask

Overview

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

Topics

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.

Initializers

init(type: NSEvent.EventType)

Returns the event mask for the specified type.

Relationships

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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software