---
title: pressedMouseButtons
framework: appkit
role: symbol
role_heading: Type Property
path: appkit/nsevent/pressedmousebuttons
---

# pressedMouseButtons

The indices of the currently pressed mouse buttons.

## Declaration

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

## Return Value

Return Value The indices of the currently depressed mouse buttons.

## Discussion

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.

## See Also

### Getting mouse event information

- [doubleClickInterval](appkit/nsevent/doubleclickinterval.md)
- [mouseLocation](appkit/nsevent/mouselocation.md)
- [buttonNumber](appkit/nsevent/buttonnumber.md)
- [clickCount](appkit/nsevent/clickcount.md)
- [associatedEventsMask](appkit/nsevent/associatedeventsmask.md)
