Enumeration

CGEventField

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

Declaration

typedef enum CGEventField : uint32_t {
    ...
} CGEventField;

Overview

These constants are used as keys to access certain specialized event fields when using low-level accessor functions such as CGEventGetIntegerValueField, CGEventSetIntegerValueField, CGEventGetDoubleValueField, and CGEventSetDoubleValueField.

Topics

Constants

kCGMouseEventNumber

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.

kCGMouseEventClickState

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.

kCGMouseEventPressure

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.

kCGMouseEventButtonNumber

Key to access an integer field that contains the mouse button number. For information about the possible values, see CGMouseButton.

kCGMouseEventDeltaX

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

kCGMouseEventDeltaY

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

kCGMouseEventInstantMouser

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

kCGMouseEventSubtype

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

kCGKeyboardEventAutorepeat

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

kCGKeyboardEventKeycode

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

kCGKeyboardEventKeyboardType

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

kCGScrollWheelEventDeltaAxis1

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.

kCGScrollWheelEventDeltaAxis2

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.

kCGScrollWheelEventDeltaAxis3

This field is not used.

kCGScrollWheelEventFixedPtDeltaAxis1

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.

kCGScrollWheelEventFixedPtDeltaAxis2

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.

kCGScrollWheelEventPointDeltaAxis1

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.

kCGScrollWheelEventPointDeltaAxis2

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.

kCGScrollWheelEventPointDeltaAxis3

This field is not used.

kCGScrollWheelEventInstantMouser

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.

kCGTabletEventPointX

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

kCGTabletEventPointY

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

kCGTabletEventPointZ

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

kCGTabletEventPointButtons

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.

kCGTabletEventPointPressure

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.

kCGTabletEventTiltX

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.

kCGTabletEventTiltY

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.

kCGTabletEventRotation

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

kCGTabletEventTangentialPressure

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.

kCGTabletEventDeviceID

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

kCGTabletEventVendor1

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

kCGTabletEventVendor2

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

kCGTabletEventVendor3

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

kCGTabletProximityEventVendorID

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

kCGTabletProximityEventTabletID

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

kCGTabletProximityEventPointerID

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

kCGTabletProximityEventDeviceID

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

kCGTabletProximityEventSystemTabletID

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

kCGTabletProximityEventVendorPointerType

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

kCGTabletProximityEventVendorPointerSerialNumber

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

kCGTabletProximityEventVendorUniqueID

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

kCGTabletProximityEventCapabilityMask

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

kCGTabletProximityEventPointerType

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

kCGTabletProximityEventEnterProximity

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.

kCGEventTargetProcessSerialNumber

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

kCGEventTargetUnixProcessID

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

kCGEventSourceUnixProcessID

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

kCGEventSourceUserData

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

kCGEventSourceUserID

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

kCGEventSourceGroupID

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

kCGEventSourceStateID

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

kCGScrollWheelEventIsContinuous

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.