Structure

CGEventFlags

Constants that indicate the modifier key state at the time an event is created, as well as other event-related states.

Declaration

struct CGEventFlags

Overview

These constants specify masks for the bits in an event flags bit mask. Event flags indicate the modifier key state at the time an event is created, as well as other event-related states. Event flags are used in accessor functions such as flags, CGEventSetFlags(_:_:), and flagsState(_:).

Topics

Constants

static var maskAlphaShift: CGEventFlags

Indicates that the Caps Lock key is down for a keyboard, mouse, or flag-changed event.

static var maskShift: CGEventFlags

Indicates that the Shift key is down for a keyboard, mouse, or flag-changed event.

static var maskControl: CGEventFlags

Indicates that the Control key is down for a keyboard, mouse, or flag-changed event.

static var maskAlternate: CGEventFlags

Indicates that the Alt or Option key is down for a keyboard, mouse, or flag-changed event.

static var maskCommand: CGEventFlags

Indicates that the Command key is down for a keyboard, mouse, or flag-changed event.

static var maskHelp: CGEventFlags

Indicates that the Help modifier key is down for a keyboard, mouse, or flag-changed event. This key is not present on most keyboards, and is different than the Help key found in the same row as Home and Page Up.

static var maskSecondaryFn: CGEventFlags

Indicates that the Fn (Function) key is down for a keyboard, mouse, or flag-changed event. This key is found primarily on laptop keyboards.

static var maskNumericPad: CGEventFlags

Identifies key events from the numeric keypad area on extended keyboards.

static var maskNonCoalesced: CGEventFlags

Indicates that mouse and pen movement events are not being coalesced.

Relationships

Conforms To