<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTrackingArea/Options-swift.struct/mouseEnteredAndExited",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSTrackingAreaOptions@NSTrackingMouseEnteredAndExited"
  },
  "title" : "mouseEnteredAndExited"
}
-->

# mouseEnteredAndExited

The owner of the tracking area receives [`mouseEntered(with:)`](/documentation/AppKit/NSResponder/mouseEntered(with:)) when the mouse cursor enters the area and [`mouseExited(with:)`](/documentation/AppKit/NSResponder/mouseExited(with:)) events when the mouse leaves the area. This value specifies a type of tracking area.

```
static var mouseEnteredAndExited: NSTrackingArea.Options { get }
```

---

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)