<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSResponder/interpretKeyEvents(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSResponder(im)interpretKeyEvents:"
  },
  "title" : "interpretKeyEvents(_:)"
}
-->

# interpretKeyEvents(_:)

Handles a series of key events.

```
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:)`](/documentation/AppKit/NSResponder/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(_:)`](/documentation/AppKit/NSStandardKeyBindingResponding/insertText(_:)) and [`doCommand(by:)`](/documentation/AppKit/NSStandardKeyBindingResponding/doCommand(by:)) messages back to the invoker of this method. Subclasses shouldn’t override this method.

See the [`NSInputManager`](/documentation/AppKit/NSInputManager) and [`NSTextInput`](/documentation/AppKit/NSTextInput) class and protocol specifications for more information on input management.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)