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

# canBecomeKeyView

A Boolean value indicating whether the view can become key view.

```
var canBecomeKeyView: Bool { get }
```

## Discussion

When the value of this property is <doc://com.apple.documentation/documentation/Swift/true>, the view can become the key view. In order to become the key view, the view must be visible, it must be installed in a window that supports keyboard entry, and the view’s [`acceptsFirstResponder`](/documentation/AppKit/NSResponder/acceptsFirstResponder) method must return <doc://com.apple.documentation/documentation/Swift/true>.

---

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)