---
title: previousValidKeyView
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsview/previousvalidkeyview
---

# previousValidKeyView

The closest view object in the key view loop that precedes the current view and accepts first responder status.

## Declaration

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

## Discussion

Discussion The value in this property is nil if there is no view that precedes the current view and accepts the first responder status. AppKit ignores hidden views when it determines the previous valid key view.

## See Also

### Related Documentation

- [selectKeyView(following:)](appkit/nswindow/selectkeyview(following:).md)
- [isHidden](appkit/nsview/ishidden.md)
- [selectNextKeyView(_:)](appkit/nswindow/selectnextkeyview(_:).md)
- [selectPreviousKeyView(_:)](appkit/nswindow/selectpreviouskeyview(_:).md)
- [selectKeyView(preceding:)](appkit/nswindow/selectkeyview(preceding:).md)

### Managing the Key-View Loop

- [canBecomeKeyView](appkit/nsview/canbecomekeyview.md)
- [needsPanelToBecomeKey](appkit/nsview/needspaneltobecomekey.md)
- [nextKeyView](appkit/nsview/nextkeyview.md)
- [nextValidKeyView](appkit/nsview/nextvalidkeyview.md)
- [previousKeyView](appkit/nsview/previouskeyview.md)
