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

# previousKeyView

The view object preceding the current view in the key view loop.

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

## Discussion

The value in this property is `nil` if there is no view preceding the current view in the key view loop. The view in this property should, if possible, be made first responder when the user navigates backward from the current view using keyboard interface control.

## See Also

[`-  selectKeyViewFollowingView:`](/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.

[`-  selectKeyViewPrecedingView:`](/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)