---
title: "mouseDown(with:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsmatrix/mousedown(with:)"
---

# mouseDown(with:)

Responds to a mouse-down event.

## Declaration

```swift
func mouseDown(with event: NSEvent)
```

## Parameters

- `event`: The mouse-down event.

## Discussion

Discussion A mouse-down event in a text cell initiates editing mode. A double click in any cell type except a text cell sends the double-click action of the receiver (if there is one) in addition to the single-click action. Your code should never invoke this method, but you may override it to implement different mouse tracking than NSMatrix does. The response of the receiver depends on its selection mode, as explained in the class description.

## See Also

### Related Documentation

- [sendAction()](appkit/nsmatrix/sendaction().md)
- [sendDoubleAction()](appkit/nsmatrix/senddoubleaction().md)

### Handling Event and Action Messages

- [acceptsFirstMouse(for:)](appkit/nsmatrix/acceptsfirstmouse(for:).md)
- [mouseDownFlags](appkit/nsmatrix/mousedownflags.md)
- [performKeyEquivalent(with:)](appkit/nsmatrix/performkeyequivalent(with:).md)
