Instance Method

discardEvents(matching:before:)

Forwards the message to the NSApplication object, NSApp.

Declaration

func discardEvents(matching mask: NSEvent.EventTypeMask, before lastEvent: NSEvent?)

Parameters

mask

The mask of the events to discard.

lastEvent

The event up to which queued events are discarded from the queue.

See Also

Handling Events

var currentEvent: NSEvent?

The event currently being processed by the application.

func nextEvent(matching: NSEvent.EventTypeMask) -> NSEvent?

Returns the next event matching a given mask.

func postEvent(NSEvent, atStart: Bool)

Forwards the message to the global NSApplication object, NSApp.

func sendEvent(NSEvent)

This action method dispatches mouse and keyboard events sent to the window by the NSApplication object.

func tryToPerform(Selector, with: Any?) -> Bool

Dispatches action messages with a given argument.