---
title: clickCount
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nsevent/clickcount
---

# clickCount

The number of mouse clicks associated with a mouse-down or mouse-up event.

## Declaration

```swift
var clickCount: Int { get }
```

## Discussion

Discussion Raises an NSInternalInconsistencyException if accessed on a non-mouse event. This property is set to 0 for a mouse-up event if a time threshold has passed since the corresponding mouse-down event. This is because if this time threshold passes before the mouse button is released, it is no longer considered a mouse click, but a mouse-down event followed by a mouse-up event. The return value of this method is meaningless for events other than mouse-down or mouse-up events.

## See Also

### Related Documentation

- [mouseEvent(with:location:modifierFlags:timestamp:windowNumber:context:eventNumber:clickCount:pressure:)](appkit/nsevent/mouseevent(with:location:modifierflags:timestamp:windownumber:context:eventnumber:clickcount:pressure:).md)

### Getting mouse event information

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