---
title: keyWindow
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiwindowscene/keywindow
---

# keyWindow

The key window associated with the scene.

## Declaration

```swift
var keyWindow: UIWindow? { get }
```

## Discussion

Discussion The key window receives keyboard and other non-touch-related events. Of a scene’s associated windows, only one window at a time may be the key window.

## See Also

### Getting the active windows

- [windows](uikit/uiwindowscene/windows.md)
- [screen](uikit/uiwindowscene/screen.md)
