<!--
{
  "availability" : [
    "macOS: 10.6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSEvent/pressedMouseButtons",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSEvent(cpy)pressedMouseButtons"
  },
  "title" : "pressedMouseButtons"
}
-->

# pressedMouseButtons

The indices of the currently pressed mouse buttons.

```
class var pressedMouseButtons: Int { get }
```

## Return Value

The indices of the currently depressed mouse buttons.

## Discussion

A return value of `1 << 0` corresponds to the left mouse button, `1 << 1` corresponds to the right mouse button, `1<< n`, `n >=2` correspond to other mouse buttons.

This returns the state of devices combined with synthesized events at the moment, independent of which events have been delivered via the event stream, so this method is not suitable for tracking.

---

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)