CGEventField Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This enum represents constants used to access specialized fields in low-level events.
public enum CGEventField
type CGEventField =
- Inheritance
-
CGEventField
Fields
| Name | Value | Description |
|---|---|---|
| MouseEventNumber | 0 | The mouse button event number. This is an integer field. Matching mouse-down and mouse-up events will have the same event number. |
| MouseEventClickState | 1 | The mouse button click state. This is an integer field. A value of 1 is a single click, a value of 2 is a double click, and so on. |
| MouseEventPressure | 2 | The mouse button pressure state, ranging from 0 (mouse being up) to 1. This is an integer field. |
| MouseEventButtonNumber | 3 | The mouse button number. This is an integer field. |
| MouseEventDeltaX | 4 | The horizontal delta since the last mouse movement event. This is an integer field. |
| MouseEventDeltaY | 5 | The vertical delta since the last mouse movement event. This is an integer field. |
| MouseEventInstantMouser | 6 | A value indicating whether the event should be ignored by the Inkwell subsystem. This is an integer field. A non-zero indicates the event should be ignored. |
| MouseEventSubtype | 7 | The mouse event subtype. This is an integer field. |
| KeyboardEventAutorepeat | 8 | A value indicating whether the key-down event is an autorepeat of a previous key-down event. This is an integer field. Zero indicates not an autorepeat, non-zero not an autorepeat. |
| KeyboardEventKeycode | 9 | The virtual keycode of the key-down or key-up event. This is an integer field. |
| KeyboardEventKeyboardType | 10 | The keyboard ype identifier This is an integer field. |
| ScrollWheelEventDeltaAxis1 | 11 | A value that represents scrolling data. Typically this is the vertical position change since the last scrolling event. This is an integer field. |
| ScrollWheelEventDeltaAxis2 | 12 | A value that represents scrolling data. Typically this is the horizontal position change since the last scrolling event. This is an integer field. |
| ScrollWheelEventDeltaAxis3 | 13 | This value is unused. |
| ScrollWheelEventInstantMouser | 14 | A value indicating whether the event should be ignored by the Inkwell subsystem. This is an integer field. A non-zero indicates the event should be ignored. |
| TabletEventPointX | 15 | A value that represents the absolute X coordinate in table space at full tablet resolution. This is an integer field. |
| TabletEventPointY | 16 | A value that represents the absolute Y coordinate in table space at full tablet resolution. This is an integer field. |
| TabletEventPointZ | 17 | A value that represents the absolute Z coordinate in table space at full tablet resolution. This is an integer field. |
| TabletEventPointButtons | 18 | A value that represents the tablet button state. This is a bitfield represented by an integer field. Bit 0 is the first button, and a set bit represents a closed or pressed button. A maximum of 16 buttons are supported. |
| TabletEventPointPressure | 19 | A value that represents the tablet pen pressure. This is a double field, with values ranging from 0.0 (no pressure) and 1.0 (maximum pressure). |
| TabletEventTiltX | 20 | A value that represents the horizontal tablet pen tilt. This is a double field, with values ranging from 0.0 (no tilt) and 1.0 (maximum tilt). |
| TabletEventTiltY | 21 | A value that represents the vertical tablet pen tilt. This is a double field, with values ranging from 0.0 (no tilt) and 1.0 (maximum tilt). |
| TabletEventRotation | 22 | A value that represents the tablet pen rotation. This is a double field. |
| TabletEventTangentialPressure | 23 | A value that represents the tangential pressure on a device. This is a double field, with values ranging from 0.0 (no pressure) and 1.0 (maximum pressure). |
| TabletEventDeviceId | 24 | A value that represents the system-assigned unique device id. This is an integer field. |
| TabletEventVendor1 | 25 | This is a vendor-specific value. This is an integer field. |
| TabletEventVendor2 | 26 | This is a vendor-specific value. This is an integer field. |
| TabletEventVendor3 | 27 | This is a vendor-specific value. This is an integer field. |
| TabletProximityEventVendorId | 28 | A value that represents the vendor-defined id, typically the USB vendor id. This is an integer field. |
| TabletProximityEventTabletId | 29 | A value that represents the vendor-defined tabled id, typically the USB product id. This is an integer field. |
| TabletProximityEventPointerId | 30 | A value that represents the vendor-defined id the pointing device. This is an integer field. |
| TabletProximityEventDeviceId | 31 | A system-assigned device id for the device. This is an integer field. |
| TabletProximityEventSystemTabletId | 32 | A system-assigned unique tablet id for the device. This is an integer field. |
| TabletProximityEventVendorPointerType | 33 | The vendor-assigned pointer type. This is an integer field. |
| TabletProximityEventVendorPointerSerialNumber | 34 | The vendor-defined pointer serial number. This is an integer field. |
| TabletProximityEventVendorUniqueId | 35 | The vendor-defined unique id. This is an integer field. |
| TabletProximityEventCapabilityMask | 36 | A value that represents the device capabilities mask. This is an integer field. |
| TabletProximityEventPointerType | 37 | A value that represents the pointer type. This is an integer field. |
| TabletProximityEventEnterProximity | 38 | A value that indicates whether the pen is in proximity to the tablet. This is an integer field. The value is non-zero if the pen is in proximity to the tablet, and zero otherwise. |
| EventTargetProcessSerialNumber | 39 | The process serial number for the target process. This is an integer field. |
| EventTargetUnixProcessId | 40 | The process id (pid) of the target process. This is an integer field. |
| EventSourceUnixProcessId | 41 | The process id (pid) of the target process. This is an integer field. |
| EventSourceUserData | 42 | User-supplied data. This is an integer field. |
| EventSourceUserId | 43 | The Unix effective UID for the event source. This is an integer field. |
| EventSourceGroupId | 44 | The Unix effective GID for the event source. This is an integer field. |
| EventSourceStateId | 45 | The state id for the event source used to create this event. This is an integer field. |
| ScrollWheelEventIsContinuous | 88 | A value that indicates whether a scrolling event contains continuous, pixel-based scrolling data. This is an integer field. The value is non-zero when the scrolling data is continuous and pixel-based, and zero otherwise (when the scrolling data is line-based). |
| EventWindowUnderMousePointer | 91 | A value that represents the event window under the mouse pointer. |
| EventWindowUnderMousePointerThatCanHandleThisEvent | 92 | A value that represents the event window under the mouse pointer that can handle this event. |
| ScrollWheelEventFixedPtDeltaAxis1 | 93 | A value that represents scrolling data. Typically this is the line-based or pixel-based vertical position change since the last scrolling event. This field is a fixed-point 16.16 signed integer, but can also be retrieved as a double and will be automatically converted. |
| ScrollWheelEventFixedPtDeltaAxis2 | 94 | A value that represents scrolling data. Typically this is the line-based or pixel-based horizontal position change since the last scrolling event. This field is a fixed-point 16.16 signed integer, but can also be retrieved as a double and will be automatically converted. |
| ScrollWheelEventFixedPtDeltaAxis3 | 95 | This value is unused. |
| ScrollWheelEventPointDeltaAxis1 | 96 | A value that represents pixel-based scrolling data. Typically this is the vertical position change since the last scrolling event. This is an integer field. |
| ScrollWheelEventPointDeltaAxis2 | 97 | A value that represents pixel-based scrolling data. Typically this is the horizontal position change since the last scrolling event. This is an integer field. |
| ScrollWheelEventPointDeltaAxis3 | 98 | This value is unused. |
| ScrollWheelEventScrollPhase | 99 | A value that represents the scroll wheel's scroll phase. |
| ScrollWheelEventScrollCount | 100 | A value that represents the scroll wheel's scroll count. |
| ScrollWheelEventMomentumPhase | 123 | A value that represents the scroll wheel's scroll momentum. |
| EventUnacceleratedPointerMovementX | 170 | The unaccelerated pointer movement for the X axis. |
| EventUnacceleratedPointerMovementY | 171 | The unaccelerated pointer movement for the Y axis. |
| ScrollWheelEventMomentumOptionPhase | 173 | A value that represents the scroll wheel's scroll momentum. |
| ScrollWheelEventAcceleratedDeltaAxis2 | 175 | A value that represents the accelerated delta value for axis 2. |
| ScrollWheelEventAcceleratedDeltaAxis1 | 176 | A value that represents the accelerated delta value for axis 1. |
| ScrollWheelEventRawDeltaAxis2 | 177 | A value that represents the raw delta value for axis 2. |
| ScrollWheelEventRawDeltaAxis1 | 178 | A value that represents the raw delta value for axis 1. |
Remarks
Call GetLongValueField(CGEventField) or GetDoubleValueField(CGEventField) to fetch the field values, and SetValueField(CGEventField, Int64) or SetValueField(CGEventField, Double) to set the field values represented by the constants in this enum.