Contents

interpretKeyEvents(_:)

Handles a series of key events.

Declaration

func interpretKeyEvents(_ eventArray: [NSEvent])

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(with:) 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 doCommand(by:) 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