Creates and returns an event object that is based on a Core Graphics type of event.
- macOS 10.5+
CGEventopaque type that represents an event.
NSEvent object that is equivalent to
The returned object retains the
CGEvent object (
cg) until it (the Objective-C object) is freed—it then releases the
CGEvent object. If no Cocoa event corresponds to the
CGEvent object, this method returns