---
title: resignKey()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nswindow/resignkey()
---

# resignKey()

Resigns the window’s key window status.

## Declaration

```swift
func resignKey()
```

## Discussion

Discussion This method sends resignKey() to the window’s first responder, sends windowDidResignKey(_:) to the window’s delegate, and posts didResignKeyNotification to the default notification center. Never invoke this method directly.

## See Also

### Related Documentation

- [resignMain()](appkit/nswindow/resignmain().md)

### Managing Key Status

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