<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "ObjectiveC",
  "identifier" : "/documentation/ObjectiveC/NSObject-swift.class/inputText(_:client:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Objective-C Runtime",
      "ObjectiveC"
    ],
    "preciseIdentifier" : "c:objc(cs)NSObject(im)inputText:client:"
  },
  "title" : "inputText(_:client:)"
}
-->

# inputText(_:client:)

Handles key down events that do not map to an action method.

```
func inputText(_ string: String!, client sender: Any!) -> Bool
```

## Parameters

`string`

The key down event, which is the text input by the client.

`sender`

The client object sending the key down events.

## Return Value

[`YES`](/documentation/ObjectiveC/YES) if the input is accepted; otherwise [`NO`](/documentation/ObjectiveC/NO).

## Discussion

An input method should implement this method when using key binding (that is, it implements [`didCommand(by:client:)`](/documentation/ObjectiveC/NSObject-swift.class/didCommand(by:client:))).

---

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)