<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow/resignKey()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWindow(im)resignKeyWindow"
  },
  "title" : "resignKey()"
}
-->

# resignKey()

Resigns the window’s key window status.

```
func resignKey()
```

## Discussion

This method sends [`resignKey()`](/documentation/AppKit/NSWindow/resignKey()) to the window’s first responder, sends [`windowDidResignKey(_:)`](/documentation/AppKit/NSWindowDelegate/windowDidResignKey(_:)) to the window’s delegate, and posts [`didResignKeyNotification`](/documentation/AppKit/NSWindow/didResignKeyNotification) to the default notification center.

Never invoke this method directly.

## See Also

[`-  resignMainWindow`](/documentation/AppKit/NSWindow/resignMain())

Resigns the window’s main window status.



---

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)