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

# worksWhenModal

A Boolean value that indicates whether the window is able to receive keyboard and mouse events even when some other window is being run modally.

```
var worksWhenModal: Bool { get }
```

## Discussion

The value of this property is <doc://com.apple.documentation/documentation/Swift/true> if the window is able to receive keyboard and mouse events even when some other window is being run modally; otherwise, <doc://com.apple.documentation/documentation/Swift/false>. By default, the `NSWindow` value of this property is <doc://com.apple.documentation/documentation/Swift/false>. Only subclasses of `NSPanel` should override this default.

## See Also

[`worksWhenModal`](/documentation/AppKit/NSPanel/worksWhenModal)

A Boolean value that indicates whether the panel receives keyboard and mouse events even when some other window is being run modally.



---

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)