Instance Method

interpretKeyEvents:

Handles a series of key events.

Declaration

- (void)interpretKeyEvents:(NSArray<NSEvent *> *)eventArray;

Parameters

eventArray

An array of key-event characters to give to the system input manager.

Discussion

This method, which is invoked by subclasses from the keyDown: method, sends the character input in eventArray to the system input manager for interpretation as text to insert or commands to perform. The input manager responds to the request by sending insertText: and doCommandBySelector: messages back to the invoker of this method. Subclasses shouldn’t override this method.

See the NSInputManager and NSTextInput class and protocol specifications for more information on input management.

See Also

Responding to Key Events

- keyDown:

Informs the receiver that the user has pressed a key.

- keyUp:

Informs the receiver that the user has released a key.

- performKeyEquivalent:

Handle a key equivalent.

- performMnemonic:

Handle a mnemonic.

Deprecated
- flushBufferedKeyEvents

Clears any unprocessed key events when overridden by subclasses.