# InputTextSuggestionState

Artifact: [androidx.compose.ui:ui](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/semantics/SemanticsProperties.kt+class:androidx.compose.ui.semantics.InputTextSuggestionState) Added in [1.11.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.11.0) Common/AllAndroid/JVM
- Cmn

  ```
  class InputTextSuggestionState
  ```

*** ** * ** ***

The state of an input text when suggestions are shown. This property specifies the different available states the input text can be in when there are text suggestions available, typically shown as a dialog window and when a user inputs a transliteration language specifically Chinese, Japanese, Korean, and Vietnamese.

On Android, this semantics property is only supported on SDK \>= 37.

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/InputTextSuggestionState#InputTextSuggestionState(kotlin.Boolean,kotlin.Boolean)( isCommittedByInputMethodEditor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, isTransliterationSuggestionSelected: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` | Cmn |

| ### Public functions |
|---|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/InputTextSuggestionState#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/InputTextSuggestionState#hashCode()()` | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/InputTextSuggestionState#toString()()` | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/InputTextSuggestionState#isCommittedByInputMethodEditor()` whether the current text was committed by an input method editor done by the user, will stay false if the committed text was done programmatically, e.g. via Accessibility service. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/InputTextSuggestionState#isTransliterationSuggestionSelected()` whether a replacement text suggestion is selected to replace the transliterated text. | Cmn |

## Public constructors

### InputTextSuggestionState

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

```
InputTextSuggestionState(
    isCommittedByInputMethodEditor: Boolean = false,
    isTransliterationSuggestionSelected: Boolean = false
)
```

| Parameters |
|---|---|
| `isCommittedByInputMethodEditor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | whether the current text was committed by an input method editor done by the user, will stay false if the committed text was done programmatically, e.g. via Accessibility service. |
| `isTransliterationSuggestionSelected: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | whether a replacement text suggestion is selected to replace the transliterated text. If true, the text is from a transliteration language and is currently displaying one or multiple text suggestion replacements and that one of the suggestions is selected to replace the transliterated text. This does not indicate whether the text replacement suggestion has been committed. Will stay false for non-transliteration languages or if no suggestion is currently selected. If this were to be set to true for a non-transliteration language, it may affect accessibility services from announcing events correctly. |

## Public functions

### equals

Cmn

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

Cmn

```
open fun hashCode(): Int
```

### toString

Cmn

```
open fun toString(): String
```

## Public properties

### isCommittedByInputMethodEditor

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

```
val isCommittedByInputMethodEditor: Boolean
```

whether the current text was committed by an input method editor done by the user, will stay false if the committed text was done programmatically, e.g. via Accessibility service.

### isTransliterationSuggestionSelected

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

```
val isTransliterationSuggestionSelected: Boolean
```

whether a replacement text suggestion is selected to replace the transliterated text. If true, the text is from a transliteration language and is currently displaying one or multiple text suggestion replacements and that one of the suggestions is selected to replace the transliterated text. This does not indicate whether the text replacement suggestion has been committed. Will stay false for non-transliteration languages or if no suggestion is currently selected. If this were to be set to true for a non-transliteration language, it may affect accessibility services from announcing events correctly.