---
title: "rightMouseDown(with:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsresponder/rightmousedown(with:)"
---

# rightMouseDown(with:)

Informs the receiver that the user has pressed the right mouse button.

## Declaration

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

## Parameters

- `event`: An object encapsulating information about the mouse-down event.

## Discussion

Discussion The default implementation simply passes this message to the next responder. note: Prior to OS X v10.7, NSView did not pass unhandled rightMouseDown(with:) events up the responder chain. In macOS 10.7 and later, NSView passes rightMouseDown(with:) events up the responder chain if AppKit doesn’t find an associated context menu to display for the view. To avoid binary compatibility issues, this new behavior is enabled only for applications linked on macOS 10.7 or later.

## See Also

### Responding to Mouse Events

- [mouseDown(with:)](appkit/nsresponder/mousedown(with:).md)
- [mouseDragged(with:)](appkit/nsresponder/mousedragged(with:).md)
- [mouseUp(with:)](appkit/nsresponder/mouseup(with:).md)
- [mouseMoved(with:)](appkit/nsresponder/mousemoved(with:).md)
- [mouseEntered(with:)](appkit/nsresponder/mouseentered(with:).md)
- [mouseExited(with:)](appkit/nsresponder/mouseexited(with:).md)
- [rightMouseDragged(with:)](appkit/nsresponder/rightmousedragged(with:).md)
- [rightMouseUp(with:)](appkit/nsresponder/rightmouseup(with:).md)
- [otherMouseDown(with:)](appkit/nsresponder/othermousedown(with:).md)
- [otherMouseDragged(with:)](appkit/nsresponder/othermousedragged(with:).md)
- [otherMouseUp(with:)](appkit/nsresponder/othermouseup(with:).md)
