Instance Method


Checks the button's key equivalent against the specified event and, if they match, simulates the button being clicked.


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



The event containing the key equivalent.

Return Value

YES if the key equivalent in anEvent matches the button's key equivalent; NO if it does not. This method also returns NO if the button is blocked by a modal panel or the button is disabled.


If the character in anEvent matches the button’s key equivalent, and the modifier flags in anEvent match the key-equivalent modifier mask, performKeyEquivalent: simulates the user clicking the button and returning YES. Otherwise, performKeyEquivalent: does nothing and returns NO.

See Also