Instance Property

modifierFlags

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

Declaration

var modifierFlags: NSEvent.ModifierFlags { get }

Discussion

You can examine individual flag settings using the C bitwise AND operator with the predefined key masks described in Getting Unicode Values. The lower 16 bits of the modifier flags are reserved for device-dependent bits.

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.

struct NSEvent.EventTypeMask

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