---
title: "sendKey(with:expectedValues:expectedValueInterval:completionHandler:)"
framework: matter
role: symbol
role_heading: Instance Method
path: "matter/mtrclusterkeypadinput/sendkey(with:expectedvalues:expectedvalueinterval:completionhandler:)"
---

# sendKey(with:expectedValues:expectedValueInterval:completionHandler:)

## Declaration

```swift
func sendKey(with params: MTRKeypadInputClusterSendKeyParams, expectedValues expectedDataValueDictionaries: [[String : Any]]?, expectedValueInterval expectedValueIntervalMs: NSNumber?, completionHandler: @escaping @Sendable (MTRKeypadInputClusterSendKeyResponseParams?, (any Error)?) -> Void)
```

```swift
func sendKey(with params: MTRKeypadInputClusterSendKeyParams, expectedValues expectedDataValueDictionaries: [[String : Any]]?, expectedValueInterval expectedValueIntervalMs: NSNumber?) async throws -> MTRKeypadInputClusterSendKeyResponseParams
```
