---
title: "performTextInputSelection"
description: "Sends the given selection to this node in similar way to IME."
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


> **Deprecated** Use the non deprecated overload

```kotlin
fun SemanticsNodeInteraction.performTextInputSelection(selection: TextRange)
```


Sends the given selection to this node in similar way to IME.

#### Parameters

| | |
| --- | --- |
| selection | the selection to send |




<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun SemanticsNodeInteraction.performTextInputSelection(
    selection: TextRange,
    relativeToOriginalText: Boolean = true,
)
```


Sends the given selection to this node in similar way to IME.

#### Parameters

| | |
| --- | --- |
| selection | the selection to send |
| relativeToOriginalText | `true` if the selection is relative to the untransformed, original text. `false` if it is relative to the visual text following any transformations. |




