<!--
{
  "availability" : [
    "iOS: 17.4.0 -",
    "iPadOS: 17.4.0 -",
    "macOS: -",
    "tvOS: 17.4.0 -",
    "visionOS: 1.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "BrowserEngineKit",
  "identifier" : "/documentation/BrowserEngineKit/BETextInputDelegate",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "BrowserEngineKit"
    ],
    "preciseIdentifier" : "c:objc(pl)BETextInputDelegate"
  },
  "title" : "BETextInputDelegate"
}
-->

# BETextInputDelegate

A delegate protocol that a browser text view uses to notify the text system of changes.

```
protocol BETextInputDelegate
```

## Overview

You don’t conform to `BETextInputDelegate` in your classes, or implement its methods.
The system creates objects that conform to this protocol and sets them as the [`asyncInputDelegate`](/documentation/BrowserEngineKit/BETextInput/asyncInputDelegate) on your browser’s custom text views.

## Topics

### Text selection

[`selectionWillChange(for:)`](/documentation/BrowserEngineKit/BETextInputDelegate/selectionWillChange(for:))

Tells the system when the selection is about to change in the document.

[`selectionDidChange(for:)`](/documentation/BrowserEngineKit/BETextInputDelegate/selectionDidChange(for:))

Tells the system when the selection has changed in the document.

### Deferring actions to the text system

[`shouldDeferEventHandlingToSystem(for:context:)`](/documentation/BrowserEngineKit/BETextInputDelegate/shouldDeferEventHandlingToSystem(for:context:))

Notify the text system that your web browser’s custom text view isn’t handling key events.

[`textInput(_:deferReplaceTextActionToSystem:)`](/documentation/BrowserEngineKit/BETextInputDelegate/textInput(_:deferReplaceTextActionToSystem:))

Defers a replace text action to the ssytem.

### Providing completion suggestions

[`textInput(_:setCandidateSuggestions:)`](/documentation/BrowserEngineKit/BETextInputDelegate/textInput(_:setCandidateSuggestions:))

Provides text suggestions to the system.

### Removing stored context information

[`invalidateTextEntryContext(for:)`](/documentation/BrowserEngineKit/BETextInputDelegate/invalidateTextEntryContext(for:))

Tells the system the text entry context has changed and that text entry UI’s need to be refreshed.



---

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)