{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

KeyInputHelpersKt

public final class KeyInputHelpersKt


Summary

Public methods

static final boolean
performKeyPress(
    @NonNull SemanticsNodeInteraction receiver,
    @NonNull KeyEvent keyEvent
)

Send the specified KeyEvent to the focused component.

Public methods

performKeyPress

public static final boolean performKeyPress(
    @NonNull SemanticsNodeInteraction receiver,
    @NonNull KeyEvent keyEvent
)

Send the specified KeyEvent to the focused component.

Returns
boolean

true if the event was consumed. False otherwise.