<!--
{
  "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

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

The window isn’t traversing the key view loop.

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

The window is proceeding to the next valid key view.

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

The window is proceeding to the previous valid key view.



---

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)