<!--
{
  "availability" : [
    "macOS: 10.9.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSEvent/SpecialKey-swift.struct",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "s:So7NSEventC6AppKitE10SpecialKeyV"
  },
  "title" : "NSEvent.SpecialKey"
}
-->

# NSEvent.SpecialKey

Constants for reserved function keys on the keyboard.

```
struct SpecialKey
```

## Overview

These constants correspond to unicode characters in the range (0xF700–0xF8FF) and are values you can use with the [`characters`](/documentation/AppKit/NSEvent/characters) and [`charactersIgnoringModifiers`](/documentation/AppKit/NSEvent/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:)`](/documentation/AppKit/NSEvent/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

[`static let backspace: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/backspace)

The backspace key.

[`static let carriageReturn: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/carriageReturn)

The carriage return key.

[`static let newline: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/newline)

The newline key.

[`static let enter: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/enter)

The enter key.

[`static let delete: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/delete)

The delete key.

[`static let deleteForward: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/deleteForward)

The delete forward key.

[`static let backTab: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/backTab)

The back tab key.

[`static let tab: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/tab)

The tab key.

### Getting the Navigation-Related Keys

[`static let upArrow: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/upArrow)

The up arrow key.

[`static let downArrow: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/downArrow)

The down arrow key.

[`static let leftArrow: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/leftArrow)

The left arrow key.

[`static let rightArrow: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/rightArrow)

The right arrow key.

[`static let pageUp: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/pageUp)

The page up key.

[`static let pageDown: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/pageDown)

The page down key.

[`static let home: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/home)

The home key.

[`static let end: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/end)

The end key.

[`static let prev: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/prev)

The previous key.

[`static let next: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/next)

The next key.

### Getting Special Behavior Keys

[`static let begin: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/begin)

The begin key.

[`static let `break`: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/break)

The break key.

[`static let clearDisplay: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/clearDisplay)

The clear display key.

[`static let clearLine: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/clearLine)

The clear line key.

[`static let deleteCharacter: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/deleteCharacter)

The delete character key.

[`static let deleteLine: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/deleteLine)

The delete line key.

[`static let execute: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/execute)

The execute key.

[`static let find: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/find)

The find key.

[`static let formFeed: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/formFeed)

The form feed key.

[`static let help: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/help)

The help key.

[`static let insert: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/insert)

The insert key.

[`static let insertCharacter: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/insertCharacter)

The insert character key.

[`static let insertLine: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/insertLine)

The insert line key.

[`static let lineSeparator: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/lineSeparator)

The line separator key.

[`static let menu: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/menu)

The menu key.

[`static let modeSwitch: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/modeSwitch)

The mode switch key.

[`static let paragraphSeparator: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/paragraphSeparator)

The paragraph separator key.

[`static let pause: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/pause)

The pause key.

[`static let print: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/print)

The print key.

[`static let printScreen: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/printScreen)

The print screen key.

[`static let redo: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/redo)

The redo key.

[`static let reset: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/reset)

The reset key.

[`static let scrollLock: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/scrollLock)

The scroll lock key.

[`static let select: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/select)

The select key.

[`static let stop: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/stop)

The stop key.

[`static let sysReq: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/sysReq)

The system request key.

[`static let system: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/system)

The system key.

[`static let undo: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/undo)

The undo key.

[`static let user: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/user)

The user key.

### Getting the Function Keys

[`static let f1: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f1)

The F1 key.

[`static let f2: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f2)

The F2 key.

[`static let f3: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f3)

The F3 key.

[`static let f4: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f4)

The F4 key.

[`static let f5: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f5)

The F5 key.

[`static let f6: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f6)

The F6 key.

[`static let f7: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f7)

The F7 key.

[`static let f8: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f8)

The F8 key.

[`static let f9: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f9)

The F9 key.

[`static let f10: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f10)

The F10 key.

[`static let f11: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f11)

The F11 key.

[`static let f12: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f12)

The F12 key.

[`static let f13: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f13)

The F13 key.

[`static let f14: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f14)

The F14 key.

[`static let f15: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f15)

The F15 key.

[`static let f16: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f16)

The F16 key.

[`static let f17: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f17)

The F17 key.

[`static let f18: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f18)

The F18 key.

[`static let f19: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f19)

The F19 key.

[`static let f20: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f20)

The F20 key.

[`static let f21: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f21)

The F21 key.

[`static let f22: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f22)

The F22 key.

[`static let f23: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f23)

The F23 key.

[`static let f24: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f24)

The F24 key.

[`static let f25: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f25)

The F25 key.

[`static let f26: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f26)

The F26 key.

[`static let f27: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f27)

The F27 key.

[`static let f28: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f28)

The F28 key.

[`static let f29: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f29)

The F29 key.

[`static let f30: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f30)

The F30 key.

[`static let f31: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f31)

The F31 key.

[`static let f32: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f32)

The F32 key.

[`static let f33: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f33)

The F33 key.

[`static let f34: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f34)

The F34 key.

[`static let f35: NSEvent.SpecialKey`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/f35)

The F35 key.

### Getting the Key’s Value

[`var unicodeScalar: Unicode.Scalar`](/documentation/AppKit/NSEvent/SpecialKey-swift.struct/unicodeScalar)

## Relationships

### Conforms To

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)