Function

performKeyPress

Send the specified KeyEvent to the focused component.

performKeyPress

Source set: Common
public fun SemanticsNodeInteraction.performKeyPress(keyEvent: KeyEvent): Boolean

Send the specified KeyEvent to the focused component.

Return

true if the event was consumed. False otherwise.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: