Structure

NSEvent.ModifierFlags

Flags that represent key states in an event object.

Declaration

struct ModifierFlags

Topics

Event Modifier Flags

static var capsLock: NSEvent.ModifierFlags

The Caps Lock key has been pressed.

static var shift: NSEvent.ModifierFlags

The Shift key has been pressed.

static var control: NSEvent.ModifierFlags

The Control key has been pressed.

static var option: NSEvent.ModifierFlags

The Option or Alt key has been pressed.

static var command: NSEvent.ModifierFlags

The Command key has been pressed.

static var numericPad: NSEvent.ModifierFlags

A key in the numeric keypad or an arrow key has been pressed.

static var help: NSEvent.ModifierFlags

The Help key has been pressed.

static var function: NSEvent.ModifierFlags

A function key has been pressed.

static var deviceIndependentFlagsMask: NSEvent.ModifierFlags

Device-independent modifier flags are masked.

Relationships

Conforms To

See Also

Getting Key Event Information

class var modifierFlags: NSEvent.ModifierFlags

Returns the currently pressed modifier flags.

class var keyRepeatDelay: TimeInterval

Returns the length of time a key must be held down in order to generate the first key repeat event.

class var keyRepeatInterval: TimeInterval

Returns the length between subsequent key repeat events being posted.

var characters: String?

The characters associated with a key-up or key-down event.

var charactersIgnoringModifiers: String?

The characters generated by a key event as if no modifier key (except for Shift) applies.

var isARepeat: Bool

A Boolean value that indicates whether the key event is a repeat.

var keyCode: UInt16

The virtual key code for the keyboard key associated with a key event.