Instance Method

nextEventMatchingMask:

Returns the next event matching a given mask.

Declaration

- (NSEvent *)nextEventMatchingMask:(NSEventMask)mask;

Parameters

mask

The mask that the event to return must match. Events with non-matching masks are left in the queue. See discardEventsMatchingMask:beforeEvent: in NSApplication for the list of mask values.

Return Value

The next event whose mask matches mask; nil when no matching event was found.

Discussion

This method calls the nextEventMatchingMask:untilDate:inMode:dequeue: method, where the matching mask parameter is the specified mask, the untilDate parameter is distantFuture, the inMode parameter is NSEventTrackingRunLoopMode, and the dequeue parameter is YES.

See Also

Handling Events

+ menuChanged:

This method does nothing; it is here for backward compatibility.

Deprecated
currentEvent

The event currently being processed by the application.

- nextEventMatchingMask:untilDate:inMode:dequeue:

Forwards the message to the global NSApplication object, NSApp.

- discardEventsMatchingMask:beforeEvent:

Forwards the message to the NSApplication object, NSApp.

- postEvent:atStart:

Forwards the message to the global NSApplication object, NSApp.

- sendEvent:

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

- tryToPerform:with:

Dispatches action messages with a given argument.