# InputTransformation.Companion

Artifact: [androidx.compose.foundation:foundation](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/text/input/InputTransformation.kt+class:androidx.compose.foundation.text.input.InputTransformation.Companion) Added in [1.7.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.7.0) Common/All
- Cmn

  ```
  object InputTransformation.Companion : InputTransformation
  ```

*** ** * ** ***

## Summary

| ### Public functions |
|---|---|---|
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/input/TextFieldBuffer.https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/input/InputTransformation#(androidx.compose.foundation.text.input.TextFieldBuffer).transformInput()()` The transform operation. | Cmn |

| ### Inherited functions |
|---|
| From [androidx.compose.foundation.text.input.InputTransformation](https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/input/InputTransformation) |---|---|---| | `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsPropertyReceiver.https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/input/InputTransformation#(androidx.compose.ui.semantics.SemanticsPropertyReceiver).applySemantics()()` Optional semantics configuration that can update certain characteristics of the applied TextField, e.g. `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/package-summary#(androidx.compose.ui.semantics.SemanticsPropertyReceiver).maxTextLength()`. | Cmn | |

| ### Inherited properties |
|---|
| From [androidx.compose.foundation.text.input.InputTransformation](https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/input/InputTransformation) |---|---|---| | `open https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/KeyboardOptions?` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/input/InputTransformation#keyboardOptions()` Optional `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/KeyboardOptions` that will be used as the default keyboard options for configuring the IME. | Cmn | |

## Public functions

### TextFieldBuffer.transformInput

Cmn Artifact: [androidx.compose.foundation:foundation](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/text/input/InputTransformation.kt+function:transformInput)

```
open fun TextFieldBuffer.transformInput(): Unit
```

The transform operation. For more information see the documentation on `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/input/InputTransformation`.

This function is scoped to `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/input/TextFieldBuffer`, a buffer that can be changed in-place to alter or reject the changes or set the selection.

To reject all changes in the scoped `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/input/TextFieldBuffer`, call `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/input/TextFieldBuffer#revertAllChanges()`.

When multiple `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/input/InputTransformation`s are linked together, the `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/input/InputTransformation#(androidx.compose.foundation.text.input.TextFieldBuffer).transformInput()` function of the first transformation is invoked before the second one. Once the changes are made to `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/input/TextFieldBuffer` by the initial `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/input/InputTransformation` in the chain, the same instance of `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/input/TextFieldBuffer` is forwarded to the subsequent transformation in the chain. Note that `https://developer.android.com/reference/kotlin/androidx/compose/foundation/text/input/TextFieldBuffer#originalValue()` never changes while the buffer is passed along the chain. This sequence persists until the chain reaches its conclusion.