---
title: nextValidKeyView
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsview/nextvalidkeyview
---

# nextValidKeyView

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

## Declaration

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

## Return Value

Return Value The closest view object in the key view loop that follows the view and accepts first responder status, or nil if there is none.

## Discussion

Discussion The value in this property is nil if there is no view that follows the current view and accepts the first responder status. AppKit ignores hidden views when it determines the next 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)
- [previousKeyView](appkit/nsview/previouskeyview.md)
- [previousValidKeyView](appkit/nsview/previousvalidkeyview.md)
