Skip to main content

Keyboard:clear()

Clear all text in the focused text field.

Signature​

Keyboard:clear(): void

Returns

void

Description​

In Accessibility mode the field's text is replaced with an empty string. In Native (root) mode it long-presses Backspace. Nothing happens when no editable field is focused.

Example​

Keyboard:type("wrong value")
Keyboard:clear()
Keyboard:type("right value")

Compatible Version: 1.0.0.37 and up