Contents

NSEvent.SpecialKey

Constants for reserved function keys on the keyboard.

Declaration

struct SpecialKey

Overview

These constants correspond to unicode characters in the range (0xF700–0xF8FF) and are values you can use with the characters and charactersIgnoringModifiers properties of the event. You can also use them in some parameters in the keyEvent(with:location:modifierFlags:timestamp:windowNumber:context:characters:charactersIgnoringModifiers:isARepeat:keyCode:) method of the event.

Note that the system handles some function keys at a lower level and your app never sees them. Examples include the Volume Up key, Volume Down key, Volume Mute key, Eject key, and Function key found on many Macs.

Topics

Getting Common Control Keys

Getting the Navigation-Related Keys

Getting Special Behavior Keys

Getting the Function Keys

Getting the Key’s Value

See Also

Getting key event information