<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow/SelectionDirection",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSSelectionDirection"
  },
  "title" : "NSWindow.SelectionDirection"
}
-->

# NSWindow.SelectionDirection

Constants that specify the direction a window is currently using to change the key view.

```
enum SelectionDirection
```

## Overview

The window uses these constants for [`keyViewSelectionDirection`](/documentation/AppKit/NSWindow/keyViewSelectionDirection).

## Topics

### Constants

[`NSDirectSelection`](/documentation/AppKit/NSWindow/SelectionDirection/directSelection)

The window isn’t traversing the key view loop.

[`NSSelectingNext`](/documentation/AppKit/NSWindow/SelectionDirection/selectingNext)

The window is proceeding to the next valid key view.

[`NSSelectingPrevious`](/documentation/AppKit/NSWindow/SelectionDirection/selectingPrevious)

The window is proceeding to the previous valid key view.

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)