<!--
{
  "availability" : [
    "macOS: 10.4.0 - 10.15.0"
  ],
  "documentType" : "symbol",
  "framework" : "Quartz",
  "identifier" : "/documentation/Quartz/QCView/setEventForwardingMask(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Quartz"
    ],
    "preciseIdentifier" : "c:objc(cs)QCView(im)setEventForwardingMask:"
  },
  "title" : "setEventForwardingMask(_:)"
}
-->

# setEventForwardingMask(_:)

Sets the mask used to filter which types of events are forwarded from the view to the composition during rendering.

```
func setEventForwardingMask(_ mask: Int)
```

## Parameters

`mask`

An event filtering mask. The mask can be a combination of any of the mask constants listed below, or the constant `NSAnyEventMask`.
    
    |Event                    |Description                                                                                              |
    |-------------------------|---------------------------------------------------------------------------------------------------------|
    |`NSLeftMouseDownMask`    |The user pressed the left button.                                                                        |
    |`NSLeftMouseDraggedMask` |The user moved the mouse with the left button down.                                                      |
    |`NSLeftMouseUpMask`      |The user released the left button.                                                                       |
    |`NSRightMouseDownMask`   |The user pressed the right button.                                                                       |
    |`NSRightMouseDraggedMask`|The user moved the mouse with the right button down.                                                     |
    |`NSRightMouseUpMask`     |The user released the right button.                                                                      |
    |`NSOtherMouseDownMask`   |The user pressed the middle button, or some button other than the left or right button.                  |
    |`NSOtherMouseDraggedMask`|The user moved the mouse with the middle button down, or some button other than the left or right button.|
    |`NSOtherMouseUpMask`     |The user released the middle button, or some button other than the left or right button.                 |
    |`NSMouseMovedMask`       |The user moved the mouse without holding down a mouse button.                                            |
    |`NSScrollWheelMask`      |The user moved the mouse scroll wheel.                                                                   |
    |`NSKeyDownMask`          |The user generated a character or characters by pressing a key.                                          |
    |`NSKeyUpMask`            |The user released a key.                                                                                 |
    |`NSFlagsChangedMask`     |The user pressed or released a modifier key, or toggled the Caps Lock key.                               |

---

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)