<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow/selectKeyView(following:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWindow(im)selectKeyViewFollowingView:"
  },
  "title" : "selectKeyView(following:)"
}
-->

# selectKeyView(following:)

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

```
func selectKeyView(following view: NSView)
```

## Parameters

`view`

The view whose following view in the key view loop to seek.

## Discussion

Sends the [`nextValidKeyView`](/documentation/AppKit/NSView/nextValidKeyView) message to `view` and, if that message returns an `NSView` object, invokes [`makeFirstResponder(_:)`](/documentation/AppKit/NSWindow/makeFirstResponder(_:)) with the returned object.

---

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)