# androidx.compose.ui.text.input

Common/AllAndroid/JVM

## Interfaces

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/EditCommand` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/EditCommand` is a command representation for the platform IME API function calls. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/InputEventCallback` | **This interface is deprecated.** This function is not being used by any APIs. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/OffsetMapping` | **This interface is deprecated.** The TextField flavors that use VisualTransformation are deprecated. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/PlatformTextInputService` | **This interface is deprecated.** Use PlatformTextInputModifierNode instead. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/VisualTransformation` | **This interface is deprecated.** The TextField flavors that use VisualTransformation are deprecated. | Cmn |

## Classes

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/BackspaceCommand` | Represents a backspace operation at the cursor position. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/CommitTextCommand` | Commit final `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/CommitTextCommand#text()` to the text box and set the new cursor position. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/DeleteAllCommand` | Deletes all the text in the buffer. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/DeleteSurroundingTextCommand` | Delete `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/DeleteSurroundingTextCommand#(kotlin.Int,kotlin.Int)` characters of text before the current cursor position, and delete `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/DeleteSurroundingTextCommand#(kotlin.Int,kotlin.Int)` characters of text after the current cursor position, excluding the selection. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/DeleteSurroundingTextInCodePointsCommand` | A variant of `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/DeleteSurroundingTextCommand`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/EditProcessor` | Helper class to apply `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/EditCommand`s on an internal buffer. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/EditingBuffer` | The editing buffer | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/FinishComposingTextCommand` | Finishes the composing text that is currently active. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/ImeAction` | Signals the keyboard what type of action should be displayed. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/ImeOptions` | The IME configuration options for `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/TextInputService`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/KeyboardCapitalization` | The capitalization style to be used in `KeyboardOptions`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/KeyboardType` | The keyboard type to be used in `KeyboardOptions`. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/MoveCursorCommand` | Moves the cursor with `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/MoveCursorCommand#(kotlin.Int)` characters. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/PasswordVisualTransformation` | **This class is deprecated.** The TextField flavors that use VisualTransformation are deprecated. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/PlatformImeOptions` | Used to configure the platform specific IME options. | Cmn android |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/SetComposingRegionCommand` | Mark a certain region of text as composing text. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/SetComposingTextCommand` | Replace the currently composing text with the given text, and set the new cursor position. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/SetSelectionCommand` | Sets the selection on the text. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/TextFieldValue` | A class holding information about the editing state. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/TextInputService` | **This class is deprecated.** Use PlatformTextInputModifierNode instead. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/TextInputSession` | **This class is deprecated.** Use PlatformTextInputModifierNode instead. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/TransformedText` | **This class is deprecated.** The TextField flavors that use VisualTransformation are deprecated. | Cmn |

## Extension functions summary

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/TextFieldValue.https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/package-summary#(androidx.compose.ui.text.input.TextFieldValue).getSelectedText()()` Returns the currently selected text. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/TextFieldValue.https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/package-summary#(androidx.compose.ui.text.input.TextFieldValue).getTextAfterSelection(kotlin.Int)(maxChars: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the text after the selection. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/AnnotatedString` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/TextFieldValue.https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/package-summary#(androidx.compose.ui.text.input.TextFieldValue).getTextBeforeSelection(kotlin.Int)(maxChars: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the text before the selection. | Cmn |

## Extension functions

### TextFieldValue.getSelectedText

Cmn 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/TextFieldValue.kt+function:getSelectedText) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun TextFieldValue.getSelectedText(): AnnotatedString
```

Returns the currently selected text.

### TextFieldValue.getTextAfterSelection

Cmn 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/TextFieldValue.kt+function:getTextAfterSelection) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun TextFieldValue.getTextAfterSelection(maxChars: Int): AnnotatedString
```

Returns the text after the selection.

| Parameters |
|---|---|
| `maxChars: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | maximum number of characters (exclusive) after the maximum value in `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/TextFieldValue#selection()`. |

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

### TextFieldValue.getTextBeforeSelection

Cmn 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/TextFieldValue.kt+function:getTextBeforeSelection) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.0.0)

```
fun TextFieldValue.getTextBeforeSelection(maxChars: Int): AnnotatedString
```

Returns the text before the selection.

| Parameters |
|---|---|
| `maxChars: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | maximum number of characters (inclusive) before the minimum value in `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/input/TextFieldValue#selection()`. |

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