---
title: becomeKey()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nswindow/becomekey()
---

# becomeKey()

Informs the window that it has become the key window.

## Declaration

```swift
func becomeKey()
```

## Discussion

Discussion This method reestablishes the window’s first responder, sends the becomeKeyWindow message to that object if it responds, and posts didBecomeKeyNotification to the default notification center. Never invoke this method directly.

## See Also

### Managing Key Status

- [isKeyWindow](appkit/nswindow/iskeywindow.md)
- [canBecomeKey](appkit/nswindow/canbecomekey.md)
- [makeKey()](appkit/nswindow/makekey().md)
- [makeKeyAndOrderFront(_:)](appkit/nswindow/makekeyandorderfront(_:).md)
- [resignKey()](appkit/nswindow/resignkey().md)
