sendEvent(_:)
This action method dispatches mouse and keyboard events the global application object sends to the window.
Declaration
func sendEvent(_ event: NSEvent)Parameters
- event:
The mouse or keyboard event to process.
Discussion
Never invoke this method directly. A right mouse-down event in a window of an inactive application isn’t delivered to the corresponding NSWindow object. Instead, a sendEvent(_:) message with a window number of 0 delivers it to the NSApplication object.