# PlatformTextInputService

Artifact: [androidx.compose.ui:ui-text](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/text/input/TextInputService.kt+class:androidx.compose.ui.text.input.PlatformTextInputService) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Deprecated in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0) Common/AllAndroid/JVM
- Cmn

  ```
  interface PlatformTextInputService
  ```

*** ** * ** ***

> [!CAUTION]
> **This interface is deprecated.**   
> Use PlatformTextInputModifierNode instead.

Platform specific text input service.

## Summary

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[hideSoftwareKeyboard](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/PlatformTextInputService#hideSoftwareKeyboard())()` **This function is deprecated.** Use PlatformTextInputModifierNode instead. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[notifyFocusedRect](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/PlatformTextInputService#notifyFocusedRect(androidx.compose.ui.geometry.Rect))(rect: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect)` **This function is deprecated.** Use PlatformTextInputModifierNode instead. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[showSoftwareKeyboard](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/PlatformTextInputService#showSoftwareKeyboard())()` **This function is deprecated.** Use PlatformTextInputModifierNode instead. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[startInput](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/PlatformTextInputService#startInput())()` **This function is deprecated.** Use PlatformTextInputModifierNode instead. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[startInput](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/PlatformTextInputService#startInput(androidx.compose.ui.text.input.TextFieldValue,androidx.compose.ui.text.input.ImeOptions,kotlin.Function1,kotlin.Function1))( value: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/TextFieldValue, imeOptions: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/ImeOptions, onEditCommand: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/EditCommand>) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html, onImeActionPerformed: (https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/ImeAction) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` **This function is deprecated.** Use PlatformTextInputModifierNode instead. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[stopInput](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/PlatformTextInputService#stopInput())()` **This function is deprecated.** Use PlatformTextInputModifierNode instead. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[updateState](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/PlatformTextInputService#updateState(androidx.compose.ui.text.input.TextFieldValue,androidx.compose.ui.text.input.TextFieldValue))(oldValue: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/TextFieldValue?, newValue: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/TextFieldValue)` **This function is deprecated.** Use PlatformTextInputModifierNode instead. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[updateTextLayoutResult](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/PlatformTextInputService#updateTextLayoutResult(androidx.compose.ui.text.input.TextFieldValue,androidx.compose.ui.text.input.OffsetMapping,androidx.compose.ui.text.TextLayoutResult,kotlin.Function1,androidx.compose.ui.geometry.Rect,androidx.compose.ui.geometry.Rect))( textFieldValue: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/TextFieldValue, offsetMapping: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/OffsetMapping, textLayoutResult: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextLayoutResult, textFieldToRootTransform: (https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Matrix) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html, innerTextFieldBounds: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect, decorationBoxBounds: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect )` **This function is deprecated.** Use PlatformTextInputModifierNode instead. | Cmn |

## Public functions

### hideSoftwareKeyboard

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Deprecated in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0)

```
fun [hideSoftwareKeyboard](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/PlatformTextInputService#hideSoftwareKeyboard())(): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Use PlatformTextInputModifierNode instead.

Hide software keyboard

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/TextInputService#hideSoftwareKeyboard()` |   |

### notifyFocusedRect

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Deprecated in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0)

```
open fun [notifyFocusedRect](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/PlatformTextInputService#notifyFocusedRect(androidx.compose.ui.geometry.Rect))(rect: Rect): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Use PlatformTextInputModifierNode instead.

Notify the focused rectangle to the system.

The system can ignore this information or use it to for additional functionality.

For example, desktop systems show a popup near the focused input area (for some languages).

### showSoftwareKeyboard

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Deprecated in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0)

```
fun [showSoftwareKeyboard](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/PlatformTextInputService#showSoftwareKeyboard())(): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Use PlatformTextInputModifierNode instead.

Request showing onscreen keyboard

There is no guarantee nor callback of the result of this API.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/TextInputService#showSoftwareKeyboard()` |   |

### startInput

Cmn Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.6.0) Deprecated in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0)

```
open fun [startInput](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/PlatformTextInputService#startInput())(): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Use PlatformTextInputModifierNode instead.

Restart input and show the keyboard. This should only be called when starting a new `PlatformTextInputModifierNode.textInputSession`.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/TextInputService#startInput(androidx.compose.ui.text.input.TextFieldValue,androidx.compose.ui.text.input.ImeOptions,kotlin.Function1,kotlin.Function1)` |   |

### startInput

Cmn

```
fun [startInput](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/PlatformTextInputService#startInput(androidx.compose.ui.text.input.TextFieldValue,androidx.compose.ui.text.input.ImeOptions,kotlin.Function1,kotlin.Function1))(
    value: TextFieldValue,
    imeOptions: ImeOptions,
    onEditCommand: (List<EditCommand>) -> Unit,
    onImeActionPerformed: (ImeAction) -> Unit
): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Use PlatformTextInputModifierNode instead.

Start text input session for given client.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/TextInputService#startInput(androidx.compose.ui.text.input.TextFieldValue,androidx.compose.ui.text.input.ImeOptions,kotlin.Function1,kotlin.Function1)` |   |

### stopInput

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Deprecated in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0)

```
fun [stopInput](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/PlatformTextInputService#stopInput())(): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Use PlatformTextInputModifierNode instead.

Stop text input session.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/TextInputService#stopInput(androidx.compose.ui.text.input.TextInputSession)` |   |

### updateState

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0) Deprecated in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0)

```
fun [updateState](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/PlatformTextInputService#updateState(androidx.compose.ui.text.input.TextFieldValue,androidx.compose.ui.text.input.TextFieldValue))(oldValue: TextFieldValue?, newValue: TextFieldValue): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Use PlatformTextInputModifierNode instead.

Notify the new editor model to IME.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/TextInputSession#updateState(androidx.compose.ui.text.input.TextFieldValue,androidx.compose.ui.text.input.TextFieldValue)` |   |

### updateTextLayoutResult

Cmn Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.6.0) Deprecated in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.7.0)

```
open fun [updateTextLayoutResult](https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/PlatformTextInputService#updateTextLayoutResult(androidx.compose.ui.text.input.TextFieldValue,androidx.compose.ui.text.input.OffsetMapping,androidx.compose.ui.text.TextLayoutResult,kotlin.Function1,androidx.compose.ui.geometry.Rect,androidx.compose.ui.geometry.Rect))(
    textFieldValue: TextFieldValue,
    offsetMapping: OffsetMapping,
    textLayoutResult: TextLayoutResult,
    textFieldToRootTransform: (Matrix) -> Unit,
    innerTextFieldBounds: Rect,
    decorationBoxBounds: Rect
): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Use PlatformTextInputModifierNode instead.

Notify the input service of layout and position changes.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/TextInputSession#updateTextLayoutResult(androidx.compose.ui.text.input.TextFieldValue,androidx.compose.ui.text.input.OffsetMapping,androidx.compose.ui.text.TextLayoutResult,kotlin.Function1,androidx.compose.ui.geometry.Rect,androidx.compose.ui.geometry.Rect)` |   |