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

# acceptsFirstMouse(for:)

Returns a Boolean value that indicates whether the view accepts the initial mouse-down event.

```
func acceptsFirstMouse(for event: NSEvent?) -> Bool
```

## Parameters

`event`

The initial mouse-down event, which must be over the view in its window.

## Discussion

Subclasses can override this method to return <doc://com.apple.documentation/documentation/Swift/true> if the view should be sent a [`mouseDown(with:)`](/documentation/AppKit/NSResponder/mouseDown(with:)) message for an initial mouse-down event, <doc://com.apple.documentation/documentation/Swift/false> if not.

The view can either return a value unconditionally or use the location of `event` to determine whether or not it wants the event. The default implementation ignores `event` and returns <doc://com.apple.documentation/documentation/Swift/false>.

Override this method in a subclass to allow instances to respond to click-through. This allows the user to click on a view in an inactive window, activating the view with one click, instead of clicking first to make the window active and then clicking the view. Most view objects refuse a click-through attempt, so the event simply activates the window. Many control objects, however, such as instances of [`NSButton`](/documentation/AppKit/NSButton) and [`NSSlider`](/documentation/AppKit/NSSlider), do accept them, so the user can immediately manipulate the control without having to release the mouse button.

---

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)