androidx.compose.foundation.text
KeyboardActions
Class · from org.jetbrains.compose.foundation:foundation:1.12.2
No hand-written docs yet.
The KeyboardActions class allows developers to specify actions that will be triggered in response to users triggering IME action on the software keyboard.
class KeyboardActions(
onDone: (KeyboardActionScope.() -> Unit)? = null,
onGo: (KeyboardActionScope.() -> Unit)? = null,
onNext: (KeyboardActionScope.() -> Unit)? = null,
onPrevious: (KeyboardActionScope.() -> Unit)? = null,
onSearch: (KeyboardActionScope.() -> Unit)? = null,
onSend: (KeyboardActionScope.() -> Unit)? = null,
)
How to get one
Create it
KeyboardActions(onDone, onGo, onNext, onPrevious, onSearch, onSend)constructorKeyboardActions(onAny: KeyboardActionScope.() -> Unit)
Used by
Parameters that take a KeyboardActions.
Properties
Default
val Default: KeyboardActions
Use this default value if you don't want to specify any action but want to use the default action implementations.
onDone
val onDone: (KeyboardActionScope.() -> Unit)?
This is run when the user triggers the Done``ImeAction.Done action. A null value indicates that the default implementation if any, should be executed.
onGo
val onGo: (KeyboardActionScope.() -> Unit)?
This is run when the user triggers the Go``ImeAction.Go action. A null value indicates that the default implementation if any, should be executed.
onNext
val onNext: (KeyboardActionScope.() -> Unit)?
This is run when the user triggers the Next``ImeAction.Next action. A null value indicates that the default implementation should be executed. The default implementation moves focus to the next item in the focus traversal order.
onPrevious
val onPrevious: (KeyboardActionScope.() -> Unit)?
This is run when the user triggers the Previous``ImeAction.Previous action. A null value indicates that the default implementation should be executed. The default implementation moves focus to the previous item in the focus traversal order.
onSearch
val onSearch: (KeyboardActionScope.() -> Unit)?
This is run when the user triggers the Search``ImeAction.Search action. A null value indicates that the default implementation if any, should be executed.
onSend
val onSend: (KeyboardActionScope.() -> Unit)?
This is run when the user triggers the Send``ImeAction.Send action. A null value indicates that the default implementation if any, should be executed.
Library docs
The KeyboardActions class allows developers to specify actions that will be triggered in
response to users triggering IME action on the software keyboard.