<!--
{
  "availability" : [
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGEvent/getIntegerValueField(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Graphics",
      "CoreGraphics"
    ],
    "preciseIdentifier" : "c:@F@CGEventGetIntegerValueField"
  },
  "title" : "getIntegerValueField(_:)"
}
-->

# getIntegerValueField(_:)

Returns the integer value of a field in a Quartz event.

```
func getIntegerValueField(_ field: CGEventField) -> Int64
```

## Parameters

`field`

A field in the specified event. Pass one of the constants listed in [`CGEventField`](/documentation/CoreGraphics/CGEventField).

## Return Value

A 64-bit integer representation of the current value of the specified field.

## Discussion

---

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)