onIndirectTouchEvent

Compose Modifier

Common
@ExperimentalIndirectTouchTypeApi
fun Modifier.onIndirectTouchEvent(onIndirectTouchEvent: (IndirectTouchEvent) -> Boolean): Modifier

Adding this modifier to the modifier parameter of a component will allow it to handle IndirectTouchEvents, if it (or one of its children) is focused.

Parameters

onIndirectTouchEventThis callback is invoked when a user interacts with a touch input device that is not associated with a touchscreen. While implementing this callback, return true to stop propagation of this event. If you return false, the event will be sent to this IndirectTouchEvent's parent.

Returns

true if the event is consumed, false otherwise.