KeyboardActions


The KeyboardActions class allows developers to specify actions that will be triggered in response to users triggering IME action on the software keyboard.

Summary

Public companion properties

KeyboardActions

Use this default value if you don't want to specify any action but want to use the default action implementations.

Cmn

Public constructors

KeyboardActions(
    onDone: (KeyboardActionScope.() -> Unit)?,
    onGo: (KeyboardActionScope.() -> Unit)?,
    onNext: (KeyboardActionScope.() -> Unit)?,
    onPrevious: (KeyboardActionScope.() -> Unit)?,
    onSearch: (KeyboardActionScope.() -> Unit)?,
    onSend: (KeyboardActionScope.() -> Unit)?
)
Cmn

Public functions

open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn

Public properties

(KeyboardActionScope.() -> Unit)?

This is run when the user triggers the Done action.

Cmn
(KeyboardActionScope.() -> Unit)?

This is run when the user triggers the Go action.

Cmn
(KeyboardActionScope.() -> Unit)?

This is run when the user triggers the Next action.

Cmn
(KeyboardActionScope.() -> Unit)?

This is run when the user triggers the Previous action.

Cmn
(KeyboardActionScope.() -> Unit)?

This is run when the user triggers the Search action.

Cmn
(KeyboardActionScope.() -> Unit)?

This is run when the user triggers the Send action.

Cmn

Public companion properties

Default

val DefaultKeyboardActions

Use this default value if you don't want to specify any action but want to use the default action implementations.

Public constructors

KeyboardActions

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
)

Public functions

equals

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

hashCode

open fun hashCode(): Int

Public properties

onDone

val onDone: (KeyboardActionScope.() -> Unit)?

This is run when the user triggers the 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 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 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.

See Modifier.focusProperties() for more details on how to specify a custom focus order if needed.

onPrevious

val onPrevious: (KeyboardActionScope.() -> Unit)?

This is run when the user triggers the 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.

See Modifier.focusProperties() for more details on how to specify a custom focus order if needed.

onSearch

val onSearch: (KeyboardActionScope.() -> Unit)?

This is run when the user triggers the 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 action. A null value indicates that the default implementation if any, should be executed.