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

# getDoubleValueField(_:)

Returns the floating-point value of a field in a Quartz event.

```
func getDoubleValueField(_ field: CGEventField) -> Double
```

## Parameters

`field`

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

## Return Value

A floating point representation of the current value of the specified field.

## Discussion

In cases where the field value is represented within the event by a fixed point number or an integer, the result is scaled to the appropriate range as part of creating the floating point representation.

---

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)