eventRef
An opaque Carbon type associated with this event.
Declaration
var eventRef: UnsafeRawPointer? { get }Discussion
This method is valid for all types of events. The EventRef object is retained by the receiver, so it is valid as long as the NSEvent object is valid, and is released when the NSEvent object is freed. You can use RetainEvent(_:) to extend the lifetime of the EventRef object, with a corresponding ReleaseEvent(_:) when you are done with it.
The system typically creates user-input events with an associated EventRef. Other NSEvent objects create an EventRef when this property is first accessed, if possible. If there is no equivalent NSEvent for this event, the property is set to NULL.