combinedClickable

fun Modifier.combinedClickable(enabled: Boolean = true, onLongClick: () -> Unit? = null, onDoubleClick: () -> Unit? = null, onClick: () -> Unit): Modifier(source)

Add click, double-click and long-click events listeners when enabled is true. This function mimics the behavior of combinedClickable in Jetpack Compose. An extension function for the Modifier that allows handling of click, double-click, and long click events. This function combines multiple input events (like mouse and touch) to trigger the respective actions based on the user's interaction.

Parameters

onLongClick

An optional lambda function that will be invoked on a long-click. If null, no action is taken.

onDoubleClick

An optional lambda function that will be invoked on a double-click. If null, no action is taken.

onClick

A lambda function to be invoked on a regular single click (non-long click).