Processes a command generated by user action such as typing certain keys or pressing the mouse button.
- macOS 10.5+
The action associated with the key down event. The selector can be an action specified in the input method dictionary of keys and actions (that is, an action specific to the input method) or one of the
NSResponderaction methods such as
delete. By definition such action methods do not return a value.
The client object sending the key down event.
true if the command is handled;
false if the command is not handled. If not handled, the event passes to the client.
This method is called when the system binds a key down event to an action method. If you implement this method you should test if it is appropriate to call the action method before actually calling it, because calling the action method implies that you agree to handle the command. Suppose you have implemented a version of
insert that terminates the conversion session and sends the fully converted text to the client. However, if you conversion buffer is empty, you want the application to receive the return key that triggered the call to
insert. In that case, when
did is called you should test your buffer before calling your implementation of
insert. If the buffer is empty, return
false to indicate that the return key should be passed on to the application. If the buffer is not empty, call
insert and then return
true as the result of