<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSView/nextKeyView",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSView(py)nextKeyView"
  },
  "title" : "nextKeyView"
}
-->

# nextKeyView

The view object that follows the current view in the key view loop.

```
unowned(unsafe) var nextKeyView: NSView? { get set }
```

## Discussion

The value in this property is `nil` if there is no next view in the key view loop. You can assign a view to this property to make that view the next view in the loop. The view in this property should, if possible, be made first responder when the user navigates forward from the view using keyboard interface control.

## See Also

[`selectKeyView(following:)`](/documentation/AppKit/NSWindow/selectKeyView(following:))

Gives key view status to the view that follows the given view.

[`selectNextKeyView(_:)`](/documentation/AppKit/NSWindow/selectNextKeyView(_:))

Searches for a candidate next key view and, if it finds one, tries to make it the first responder.

[`selectPreviousKeyView(_:)`](/documentation/AppKit/NSWindow/selectPreviousKeyView(_:))

Searches for a candidate previous key view and, if it finds one, tries to make it the first responder.

[`selectKeyView(preceding:)`](/documentation/AppKit/NSWindow/selectKeyView(preceding:))

Gives key view status to the view that precedes the given 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)