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

# CGEventField

Constants used as keys to access specialized fields in low-level events.

```
enum CGEventField
```

## Overview

These constants are used as keys to access certain specialized event fields when using low-level accessor functions such as [`getIntegerValueField(_:)`](/documentation/CoreGraphics/CGEvent/getIntegerValueField(_:)), [`setIntegerValueField(_:value:)`](/documentation/CoreGraphics/CGEvent/setIntegerValueField(_:value:)), [`getDoubleValueField(_:)`](/documentation/CoreGraphics/CGEvent/getDoubleValueField(_:)), and [`setDoubleValueField(_:value:)`](/documentation/CoreGraphics/CGEvent/setDoubleValueField(_:value:)).

## Topics

### Constants

[`CGEventField.mouseEventNumber`](/documentation/CoreGraphics/CGEventField/mouseEventNumber)

Key to access an integer field that contains the mouse button event number. Matching mouse-down and mouse-up events will have the same event number.

[`CGEventField.mouseEventClickState`](/documentation/CoreGraphics/CGEventField/mouseEventClickState)

Key to access an integer field that contains the mouse button click state. A click state of 1 represents a single click. A click state of 2 represents a double-click. A click state of 3 represents a triple-click.

[`CGEventField.mouseEventPressure`](/documentation/CoreGraphics/CGEventField/mouseEventPressure)

Key to access a double field that contains the mouse button pressure. The pressure value may range from 0 to 1, with 0 representing the mouse being up. This value is commonly set by tablet pens mimicking a mouse.

[`CGEventField.mouseEventButtonNumber`](/documentation/CoreGraphics/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).

[`CGEventField.mouseEventDeltaX`](/documentation/CoreGraphics/CGEventField/mouseEventDeltaX)

Key to access an integer field that contains the horizontal mouse delta since the last mouse movement event.

[`CGEventField.mouseEventDeltaY`](/documentation/CoreGraphics/CGEventField/mouseEventDeltaY)

Key to access an integer field that contains the vertical mouse delta since the last mouse movement event.

[`CGEventField.mouseEventInstantMouser`](/documentation/CoreGraphics/CGEventField/mouseEventInstantMouser)

Key to access an integer field. The value is non-zero if the event should be ignored by the Inkwell subsystem.

[`CGEventField.mouseEventSubtype`](/documentation/CoreGraphics/CGEventField/mouseEventSubtype)

Key to access an integer field that encodes the mouse event subtype as a `kCFNumberIntType`.

[`CGEventField.keyboardEventAutorepeat`](/documentation/CoreGraphics/CGEventField/keyboardEventAutorepeat)

Key to access an integer field, non-zero when this is an autorepeat of a key-down, and zero otherwise.

[`CGEventField.keyboardEventKeycode`](/documentation/CoreGraphics/CGEventField/keyboardEventKeycode)

Key to access an integer field that contains the virtual keycode of the key-down or key-up event.

[`CGEventField.keyboardEventKeyboardType`](/documentation/CoreGraphics/CGEventField/keyboardEventKeyboardType)

Key to access an integer field that contains the keyboard type identifier.

[`CGEventField.scrollWheelEventDeltaAxis1`](/documentation/CoreGraphics/CGEventField/scrollWheelEventDeltaAxis1)

Key to access an integer field that contains scrolling data. This field typically contains the change in vertical position since the last scrolling event from a Mighty Mouse scroller or a single-wheel mouse scroller.

[`CGEventField.scrollWheelEventDeltaAxis2`](/documentation/CoreGraphics/CGEventField/scrollWheelEventDeltaAxis2)

Key to access an integer field that contains scrolling data. This field typically contains the change in horizontal position since the last scrolling event from a Mighty Mouse scroller.

[`CGEventField.scrollWheelEventDeltaAxis3`](/documentation/CoreGraphics/CGEventField/scrollWheelEventDeltaAxis3)

This field is not used.

[`CGEventField.scrollWheelEventFixedPtDeltaAxis1`](/documentation/CoreGraphics/CGEventField/scrollWheelEventFixedPtDeltaAxis1)

Key to access a field that contains scrolling data. The scrolling data represents a line-based or pixel-based change in vertical position since the last scrolling event from a Mighty Mouse scroller or a single-wheel mouse scroller. The scrolling data uses a fixed-point 16.16 signed integer format. For example, if the field contains a value of 1.0, the integer 0x00010000 is returned by `CGEventGetIntegerValueField`. If this key is passed to `CGEventGetDoubleValueField`, the fixed-point value is converted to a double value.

[`CGEventField.scrollWheelEventFixedPtDeltaAxis2`](/documentation/CoreGraphics/CGEventField/scrollWheelEventFixedPtDeltaAxis2)

Key to access a field that contains scrolling data. The scrolling data represents a line-based or pixel-based change in horizontal position since the last scrolling event from a Mighty Mouse scroller. The scrolling data uses a fixed-point 16.16 signed integer format. For example, if the field contains a value of 1.0, the integer 0x00010000 is returned by `CGEventGetIntegerValueField`. If this key is passed to `CGEventGetDoubleValueField`, the fixed-point value is converted to a double value.

[`CGEventField.scrollWheelEventFixedPtDeltaAxis3`](/documentation/CoreGraphics/CGEventField/scrollWheelEventFixedPtDeltaAxis3)

This field is not used.

[`CGEventField.scrollWheelEventPointDeltaAxis1`](/documentation/CoreGraphics/CGEventField/scrollWheelEventPointDeltaAxis1)

Key to access an integer field that contains pixel-based scrolling data. The scrolling data represents the change in vertical position since the last scrolling event from a Mighty Mouse scroller or a single-wheel mouse scroller.

[`CGEventField.scrollWheelEventPointDeltaAxis2`](/documentation/CoreGraphics/CGEventField/scrollWheelEventPointDeltaAxis2)

Key to access an integer field that contains pixel-based scrolling data. The scrolling data represents the change in horizontal position since the last scrolling event from a Mighty Mouse scroller.

[`CGEventField.scrollWheelEventPointDeltaAxis3`](/documentation/CoreGraphics/CGEventField/scrollWheelEventPointDeltaAxis3)

This field is not used.

[`CGEventField.scrollWheelEventInstantMouser`](/documentation/CoreGraphics/CGEventField/scrollWheelEventInstantMouser)

Key to access an integer field that indicates whether the event should be ignored by the Inkwell subsystem. If the value is non-zero, the event should be ignored.

[`CGEventField.tabletEventPointX`](/documentation/CoreGraphics/CGEventField/tabletEventPointX)

Key to access an integer field that contains the absolute X coordinate in tablet space at full tablet resolution.

[`CGEventField.tabletEventPointY`](/documentation/CoreGraphics/CGEventField/tabletEventPointY)

Key to access an integer field that contains the absolute Y coordinate in tablet space at full tablet resolution.

[`CGEventField.tabletEventPointZ`](/documentation/CoreGraphics/CGEventField/tabletEventPointZ)

Key to access an integer field that contains the absolute Z coordinate in tablet space at full tablet resolution.

[`CGEventField.tabletEventPointButtons`](/documentation/CoreGraphics/CGEventField/tabletEventPointButtons)

Key to access an integer field that contains the tablet button state. Bit 0 is the first button, and a set bit represents a closed or pressed button. Up to 16 buttons are supported.

[`CGEventField.tabletEventPointPressure`](/documentation/CoreGraphics/CGEventField/tabletEventPointPressure)

Key to access a double field that contains the tablet pen pressure. A value of 0.0 represents no pressure, and 1.0 represents maximum pressure.

[`CGEventField.tabletEventTiltX`](/documentation/CoreGraphics/CGEventField/tabletEventTiltX)

Key to access a double field that contains the horizontal tablet pen tilt. A value of 0.0 represents no tilt, and 1.0 represents maximum tilt.

[`CGEventField.tabletEventTiltY`](/documentation/CoreGraphics/CGEventField/tabletEventTiltY)

Key to access a double field that contains the vertical tablet pen tilt. A value of 0.0 represents no tilt, and 1.0 represents maximum tilt.

[`CGEventField.tabletEventRotation`](/documentation/CoreGraphics/CGEventField/tabletEventRotation)

Key to access a double field that contains the tablet pen rotation.

[`CGEventField.tabletEventTangentialPressure`](/documentation/CoreGraphics/CGEventField/tabletEventTangentialPressure)

Key to access a double field that contains the tangential pressure on the device. A value of 0.0 represents no pressure, and 1.0 represents maximum pressure.

[`CGEventField.tabletEventDeviceID`](/documentation/CoreGraphics/CGEventField/tabletEventDeviceID)

Key to access an integer field that contains the system-assigned unique device ID.

[`CGEventField.tabletEventVendor1`](/documentation/CoreGraphics/CGEventField/tabletEventVendor1)

Key to access an integer field that contains a vendor-specified value.

[`CGEventField.tabletEventVendor2`](/documentation/CoreGraphics/CGEventField/tabletEventVendor2)

Key to access an integer field that contains a vendor-specified value.

[`CGEventField.tabletEventVendor3`](/documentation/CoreGraphics/CGEventField/tabletEventVendor3)

Key to access an integer field that contains a vendor-specified value.

[`CGEventField.tabletProximityEventVendorID`](/documentation/CoreGraphics/CGEventField/tabletProximityEventVendorID)

Key to access an integer field that contains the vendor-defined ID, typically the USB vendor ID.

[`CGEventField.tabletProximityEventTabletID`](/documentation/CoreGraphics/CGEventField/tabletProximityEventTabletID)

Key to access an integer field that contains the vendor-defined tablet ID, typically the USB product ID.

[`CGEventField.tabletProximityEventPointerID`](/documentation/CoreGraphics/CGEventField/tabletProximityEventPointerID)

Key to access an integer field that contains the vendor-defined ID of the pointing device.

[`CGEventField.tabletProximityEventDeviceID`](/documentation/CoreGraphics/CGEventField/tabletProximityEventDeviceID)

Key to access an integer field that contains the system-assigned device ID.

[`CGEventField.tabletProximityEventSystemTabletID`](/documentation/CoreGraphics/CGEventField/tabletProximityEventSystemTabletID)

Key to access an integer field that contains the system-assigned unique tablet ID.

[`CGEventField.tabletProximityEventVendorPointerType`](/documentation/CoreGraphics/CGEventField/tabletProximityEventVendorPointerType)

Key to access an integer field that contains the vendor-assigned pointer type.

[`CGEventField.tabletProximityEventVendorPointerSerialNumber`](/documentation/CoreGraphics/CGEventField/tabletProximityEventVendorPointerSerialNumber)

Key to access an integer field that contains the vendor-defined pointer serial number.

[`CGEventField.tabletProximityEventVendorUniqueID`](/documentation/CoreGraphics/CGEventField/tabletProximityEventVendorUniqueID)

Key to access an integer field that contains the vendor-defined unique ID.

[`CGEventField.tabletProximityEventCapabilityMask`](/documentation/CoreGraphics/CGEventField/tabletProximityEventCapabilityMask)

Key to access an integer field that contains the device capabilities mask.

[`CGEventField.tabletProximityEventPointerType`](/documentation/CoreGraphics/CGEventField/tabletProximityEventPointerType)

Key to access an integer field that contains the pointer type.

[`CGEventField.tabletProximityEventEnterProximity`](/documentation/CoreGraphics/CGEventField/tabletProximityEventEnterProximity)

Key to access an integer field that indicates whether the pen is in proximity to the tablet. The value is non-zero if the pen is in proximity to the tablet and zero when leaving the tablet.

[`CGEventField.eventTargetProcessSerialNumber`](/documentation/CoreGraphics/CGEventField/eventTargetProcessSerialNumber)

Key to access a field that contains the event target process serial number. The value is a 64-bit long word.

[`CGEventField.eventTargetUnixProcessID`](/documentation/CoreGraphics/CGEventField/eventTargetUnixProcessID)

Key to access a field that contains the event target Unix process ID.

[`CGEventField.eventSourceUnixProcessID`](/documentation/CoreGraphics/CGEventField/eventSourceUnixProcessID)

Key to access a field that contains the event source Unix process ID.

[`CGEventField.eventSourceUserData`](/documentation/CoreGraphics/CGEventField/eventSourceUserData)

Key to access a field that contains the event source user-supplied data, up to 64 bits.

[`CGEventField.eventSourceUserID`](/documentation/CoreGraphics/CGEventField/eventSourceUserID)

Key to access a field that contains the event source Unix effective UID.

[`CGEventField.eventSourceGroupID`](/documentation/CoreGraphics/CGEventField/eventSourceGroupID)

Key to access a field that contains the event source Unix effective GID.

[`CGEventField.eventSourceStateID`](/documentation/CoreGraphics/CGEventField/eventSourceStateID)

Key to access a field that contains the event source state ID used to create this event.

[`CGEventField.scrollWheelEventIsContinuous`](/documentation/CoreGraphics/CGEventField/scrollWheelEventIsContinuous)

Key to access an integer field that indicates whether a scrolling event contains continuous, pixel-based scrolling data. The value is non-zero when the scrolling data is pixel-based and zero when the scrolling data is line-based.

[`CGEventField.mouseEventWindowUnderMousePointer`](/documentation/CoreGraphics/CGEventField/mouseEventWindowUnderMousePointer)

[`CGEventField.mouseEventWindowUnderMousePointerThatCanHandleThisEvent`](/documentation/CoreGraphics/CGEventField/mouseEventWindowUnderMousePointerThatCanHandleThisEvent)

[`CGEventField.scrollWheelEventMomentumPhase`](/documentation/CoreGraphics/CGEventField/scrollWheelEventMomentumPhase)

[`CGEventField.scrollWheelEventScrollCount`](/documentation/CoreGraphics/CGEventField/scrollWheelEventScrollCount)

[`CGEventField.scrollWheelEventScrollPhase`](/documentation/CoreGraphics/CGEventField/scrollWheelEventScrollPhase)

### Enumeration Cases

[`CGEventField.mouseEventWindowUnderMousePointer`](/documentation/CoreGraphics/CGEventField/mouseEventWindowUnderMousePointer)

[`CGEventField.mouseEventWindowUnderMousePointerThatCanHandleThisEvent`](/documentation/CoreGraphics/CGEventField/mouseEventWindowUnderMousePointerThatCanHandleThisEvent)

[`CGEventField.scrollWheelEventMomentumPhase`](/documentation/CoreGraphics/CGEventField/scrollWheelEventMomentumPhase)

[`CGEventField.scrollWheelEventScrollCount`](/documentation/CoreGraphics/CGEventField/scrollWheelEventScrollCount)

[`CGEventField.scrollWheelEventScrollPhase`](/documentation/CoreGraphics/CGEventField/scrollWheelEventScrollPhase)

[`CGEventField.eventUnacceleratedPointerMovementX`](/documentation/CoreGraphics/CGEventField/eventUnacceleratedPointerMovementX)

[`CGEventField.eventUnacceleratedPointerMovementY`](/documentation/CoreGraphics/CGEventField/eventUnacceleratedPointerMovementY)

[`CGEventField.scrollWheelEventAcceleratedDeltaAxis1`](/documentation/CoreGraphics/CGEventField/scrollWheelEventAcceleratedDeltaAxis1)

[`CGEventField.scrollWheelEventAcceleratedDeltaAxis2`](/documentation/CoreGraphics/CGEventField/scrollWheelEventAcceleratedDeltaAxis2)

[`CGEventField.scrollWheelEventMomentumOptionPhase`](/documentation/CoreGraphics/CGEventField/scrollWheelEventMomentumOptionPhase)

[`CGEventField.scrollWheelEventRawDeltaAxis1`](/documentation/CoreGraphics/CGEventField/scrollWheelEventRawDeltaAxis1)

[`CGEventField.scrollWheelEventRawDeltaAxis2`](/documentation/CoreGraphics/CGEventField/scrollWheelEventRawDeltaAxis2)



---

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)