<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGEventField/mouseEventButtonNumber",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Core Graphics"
    ],
    "preciseIdentifier" : "c:@E@CGEventField@kCGMouseEventButtonNumber"
  },
  "title" : "CGEventField.mouseEventButtonNumber"
}
-->

# CGEventField.mouseEventButtonNumber

Key to access an integer field that contains the mouse button number. For information about the possible values, see [`CGMouseButton`](/documentation/CoreGraphics/CGMouseButton).

```
case mouseEventButtonNumber
```

---

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)