# PlatformTextInputMethodTestOverride

Common/AllAndroid/JVM

## Functions summary

|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/ui/test/ExperimentalTestApi @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable [PlatformTextInputMethodTestOverride](https://developer.android.com/reference/kotlin/androidx/compose/ui/test/PlatformTextInputMethodTestOverride.composable#PlatformTextInputMethodTestOverride(androidx.compose.ui.platform.PlatformTextInputSession,kotlin.Function0))( sessionHandler: https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/PlatformTextInputSession, content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` **This function is deprecated.** Use InterceptPlatformTextInput instead | Cmn |

## Functions

### PlatformTextInputMethodTestOverride

Cmn Artifact: [androidx.compose.ui:ui-test](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/test/PlatformTextInputMethodOverride.kt+function:PlatformTextInputMethodTestOverride) 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)

```
@ExperimentalTestApi
@Composable
fun [PlatformTextInputMethodTestOverride](https://developer.android.com/reference/kotlin/androidx/compose/ui/test/PlatformTextInputMethodTestOverride.composable#PlatformTextInputMethodTestOverride(androidx.compose.ui.platform.PlatformTextInputSession,kotlin.Function0))(
    sessionHandler: PlatformTextInputSession,
    content: @Composable () -> Unit
): Unit
```

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

Installs a custom `https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/PlatformTextInputSession` implementation to run when `https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/PlatformTextInputSession#startInputMethod(androidx.compose.ui.platform.PlatformTextInputMethodRequest)` is called by text editors inside `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#PlatformTextInputMethodTestOverride(androidx.compose.ui.platform.PlatformTextInputSession,kotlin.Function0)`.

| Parameters |
|---|---|
| `sessionHandler: https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/PlatformTextInputSession` | The `https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/PlatformTextInputSession` to use to handle input method requests. This object does *not* need to worry about synchronizing calls to `https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/PlatformTextInputSession#startInputMethod(androidx.compose.ui.platform.PlatformTextInputMethodRequest)` -- this composable will handle the session management the same way as in production. |
| `content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | The composable content for which to override the input method handler. |