Contents

setIntegerValueField(_:value:)

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

Declaration

func setIntegerValueField(_ field: CGEventField, value: Int64)

Parameters

  • field:

    A field in the specified event. Pass one of the constants listed in Cgeventfield.

  • value:

    The new value of the specified field.

Discussion

Before calling this function, the event type must be set using a typed event creation function such as init(mouseEventSource:mouseType:mouseCursorPosition:mouseButton:), or by calling CGEventSetType.

If you are creating a mouse event generated by a tablet, call this function and specify the field kCGMouseEventSubtype with a value of kCGEventMouseSubtypeTabletPoint or kCGEventMouseSubtypeTabletProximity before setting other parameters.

See Also

Functions