<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIWindow/isKeyWindow",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIWindow(py)keyWindow"
  },
  "title" : "isKeyWindow"
}
-->

# isKeyWindow

A Boolean value that indicates whether the window is the key window.

```
var isKeyWindow: Bool { get }
```

## Discussion

In iOS 15 and later, the value of this property is <doc://com.apple.documentation/documentation/Swift/true> when the window is the key window of its scene. In iOS 14 and earlier, the value of this property is <doc://com.apple.documentation/documentation/Swift/true> when the window is the key window in the app.

The key window receives keyboard and other non-touch-related events. Only one window at a time may be the key window.

---

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)