---
title: NSClickGestureRecognizer
framework: appkit
role: symbol
role_heading: Class
path: appkit/nsclickgesturerecognizer
---

# NSClickGestureRecognizer

A discrete gesture recognizer that tracks a specified number of mouse clicks.

## Declaration

```swift
class NSClickGestureRecognizer
```

## Overview

Overview When configuring this gesture recognizer, you can specify which mouse buttons must be clicked and how many clicks must occur before the action method is called. The user must click the specified mouse button the required number of times without dragging the mouse for the gesture to be recognized. The gesture recognizer automatically sets the values of the delaysPrimaryMouseButtonEvents, delaysSecondaryMouseButtonEvents, and delaysOtherMouseButtonEvents properties to true for each button in the buttonMask property.

## Topics

### Configuring the Gesture

- [buttonMask](appkit/nsclickgesturerecognizer/buttonmask.md)
- [numberOfClicksRequired](appkit/nsclickgesturerecognizer/numberofclicksrequired.md)
- [numberOfTouchesRequired](appkit/nsclickgesturerecognizer/numberoftouchesrequired.md)

## Relationships

### Inherits From

- [NSGestureRecognizer](appkit/nsgesturerecognizer.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Standard Gestures

- [NSPressGestureRecognizer](appkit/nspressgesturerecognizer.md)
- [NSPanGestureRecognizer](appkit/nspangesturerecognizer.md)
- [NSRotationGestureRecognizer](appkit/nsrotationgesturerecognizer.md)
- [NSMagnificationGestureRecognizer](appkit/nsmagnificationgesturerecognizer.md)
