---
title: "interpretKeyEvents(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsresponder/interpretkeyevents(_:)"
---

# interpretKeyEvents(_:)

Handles a series of key events.

## Declaration

```swift
func interpretKeyEvents(_ eventArray: [NSEvent])
```

## Parameters

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

## Discussion

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

- [keyDown(with:)](appkit/nsresponder/keydown(with:).md)
- [keyUp(with:)](appkit/nsresponder/keyup(with:).md)
- [performKeyEquivalent(with:)](appkit/nsresponder/performkeyequivalent(with:).md)
- [flushBufferedKeyEvents()](appkit/nsresponder/flushbufferedkeyevents().md)
