Invoked to allow the delegate to return the target and action for a key-down event.
- macOS 10.3+
The menu object sending the delegation message.
NSEventobject representing a key-down event.
Return by reference the target object for the menu item that corresponds to the event. Specify
nilto request the menu's target.
Return by reference the action selector for the menu item that corresponds to the event.
If there is a valid and enabled menu item that corresponds to this key-down even, return
YES after specifying the target and action. Return
NO if there are no items with that key equivalent or if the item is disabled.
If the delegate doesn’t define this method, the menu is populated to find out if any items have a matching key equivalent.