Android 12 Developer Preview is here! Try it out, and give us your feedback!

BackspaceCommand

class BackspaceCommand : EditCommand
kotlin.Any
   ↳ androidx.compose.ui.text.input.BackspaceCommand

Represents a backspace operation at the cursor position.

If there is composition, delete the text in the composition range. If there is no composition but there is selection, delete whole selected range. If there is no composition and selection, perform backspace key event at the cursor position.

Summary

Public constructors

Represents a backspace operation at the cursor position.

Public methods
Unit

Apply the command on the editing buffer.

Boolean
equals(other: Any?)

Int

String

Public constructors

<init>

BackspaceCommand()

Represents a backspace operation at the cursor position.

If there is composition, delete the text in the composition range. If there is no composition but there is selection, delete whole selected range. If there is no composition and selection, perform backspace key event at the cursor position.

Public methods

applyTo

fun applyTo(buffer: EditingBuffer): Unit

Apply the command on the editing buffer.

equals

fun equals(other: Any?): Boolean

hashCode

fun hashCode(): Int

toString

fun toString(): String