---
title: buttonMask
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsevent/buttonmask-swift.property
---

# buttonMask

A bit mask identifying the buttons pressed for a tablet event.

## Declaration

```swift
var buttonMask: NSEvent.ButtonMask { get }
```

## Discussion

Discussion Use one or more of the button-mask constants described in Getting Unicode Values to determine which of the pointing device’s buttons are pressed. This property is valid only for mouse events with a subtype of NSTabletPointEventSubtype and for events of type NSTabletPoint; otherwise, the property is set to 0.

## See Also

### Getting tablet pointing information

- [absoluteX](appkit/nsevent/absolutex.md)
- [absoluteY](appkit/nsevent/absolutey.md)
- [absoluteZ](appkit/nsevent/absolutez.md)
- [NSEvent.ButtonMask](appkit/nsevent/buttonmask-swift.struct.md)
- [rotation](appkit/nsevent/rotation.md)
- [tangentialPressure](appkit/nsevent/tangentialpressure.md)
- [tilt](appkit/nsevent/tilt.md)
- [vendorDefined](appkit/nsevent/vendordefined.md)
