Instance Method


Implemented by subclasses to respond to key equivalents (also known as keyboard shortcuts).


- (BOOL)performKeyEquivalent:(NSEvent *)event;



The key-down event object representing a key equivalent.

Return Value

YES if theEvent is a key equivalent that the view handled, NO if it is not a key equivalent that it should handle.


If the view’s key equivalent is the same as the characters of the key-down event theEvent, as returned by charactersIgnoringModifiers, the view should take the appropriate action and return YES. Otherwise, it should return the result of invoking super’s implementation. The default implementation of this method simply passes the message down the view hierarchy (from superviews to subviews) and returns NO if none of the view’s subviews responds YES.

See Also

Event Handling

- acceptsFirstMouse:

Overridden by subclasses to return YES if the view should be sent a mouseDown: message for an initial mouse-down event, NO if not.

- hitTest:

Returns the farthest descendant of the view in the view hierarchy (including itself) that contains a specified point, or nil if that point lies completely outside the view.

- mouse:inRect:

Returns whether a region of the view contains a specified point, accounting for whether the view is flipped or not.

- rightMouseDown:

Informs the view that the user has pressed the right mouse button.


A Boolean value indicating whether the view can pass mouse down events through to its superviews.


The text input context object for the view.