CGEventType
Constants that specify the different types of input events.
Declaration
enum CGEventTypeOverview
These constants are used:
In the functions tapCreate(tap:place:options:eventsOfInterest:callback:userInfo:) and tapCreateForPSN(processSerialNumber:place:options:eventsOfInterest:callback:userInfo:) to specify the events of interest for the new event tap.
To indicate the event type passed to your event tap callback function.
In the function init(mouseEventSource:mouseType:mouseCursorPosition:mouseButton:) to specify the type of mouse event.
In the functions type and CGEventSetType to identify the event type.
In the functions counterForEventType(_:eventType:) and secondsSinceLastEventType(_:eventType:) to indicate the event type.
Note that tablet devices may generate mouse events with embedded tablet data, or tablet pointer and proximity events. Tablet mouse events allow tablets to be used with applications that are not tablet-aware.
Topics
Constants
CGEventType.nullCGEventType.leftMouseDownCGEventType.leftMouseUpCGEventType.rightMouseDownCGEventType.rightMouseUpCGEventType.mouseMovedCGEventType.leftMouseDraggedCGEventType.rightMouseDraggedCGEventType.keyDownCGEventType.keyUpCGEventType.flagsChangedCGEventType.scrollWheelCGEventType.tabletPointerCGEventType.tabletProximityCGEventType.otherMouseDownCGEventType.otherMouseUpCGEventType.otherMouseDraggedCGEventType.tapDisabledByTimeoutCGEventType.tapDisabledByUserInput