# TouchInjectionScope

Artifact: [androidx.compose.ui:ui-test](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/test/TouchInjectionScope.kt+class:androidx.compose.ui.test.TouchInjectionScope) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.1.0) Common/AllAndroid/JVM
- Cmn

  ```
  interface TouchInjectionScope : InjectionScope
  ```

*** ** * ** ***

The receiver scope of the touch input injection lambda from `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.SemanticsNodeInteraction).performTouchInput(kotlin.Function1)`.

The functions in `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope` can roughly be divided into two groups: full gestures and individual touch events. The individual touch events are: `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#down(kotlin.Int,androidx.compose.ui.geometry.Offset)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#move(kotlin.Long)` and friends, `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#up(kotlin.Int)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#cancel(kotlin.Long)` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#advanceEventTime(kotlin.Long)`. Full gestures are all the other functions, like `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).click(androidx.compose.ui.geometry.Offset)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).doubleClick(androidx.compose.ui.geometry.Offset,kotlin.Long)`, `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipe(androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Offset,kotlin.Long)`, etc. These are built on top of the individual events and serve as a good example on how you can build your own full gesture functions.

A touch gesture is started with a `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#down(kotlin.Int,androidx.compose.ui.geometry.Offset)` event, followed by a sequence of `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#move(kotlin.Long)` events and finally an `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#up(kotlin.Int)` event, optionally combined with more sets of `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#down(kotlin.Int,androidx.compose.ui.geometry.Offset)` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#up(kotlin.Int)` events for multi-touch gestures. Most methods accept a pointerId to specify which pointer (finger) the event applies to. Movement can be expressed absolutely with `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveTo(kotlin.Int,androidx.compose.ui.geometry.Offset,kotlin.Long)` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#updatePointerTo(kotlin.Int,androidx.compose.ui.geometry.Offset)`, or relative to the current pointer position with `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveBy(kotlin.Int,androidx.compose.ui.geometry.Offset,kotlin.Long)` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#updatePointerBy(kotlin.Int,androidx.compose.ui.geometry.Offset)`. The `moveTo/By` methods enqueue an event immediately, while the `updatePointerTo/By` methods don't. This allows you to update the position of multiple pointers in a single `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#move(kotlin.Long)` event for multi-touch gestures. Touch gestures can be cancelled with `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#cancel(kotlin.Long)`. All events, regardless the method used, will always contain the current position of *all* pointers.

The entire event injection state is shared between all `perform.*Input` methods, meaning you can continue an unfinished touch gesture in a subsequent invocation of `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.SemanticsNodeInteraction).performTouchInput(kotlin.Function1)` or `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.SemanticsNodeInteraction).performMultiModalInput(kotlin.Function1)`. Note however that while the pointer positions are retained across invocation of `perform.*Input` methods, they are always manipulated in the current node's local coordinate system. That means that two subsequent invocations of `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.SemanticsNodeInteraction).performTouchInput(kotlin.Function1)` on different nodes will report a different `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#currentPosition(kotlin.Int)`, even though it is actually the same position on the screen.

All events sent by these methods are batched together and sent as a whole after `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.SemanticsNodeInteraction).performTouchInput(kotlin.Function1)` has executed its code block. Because gestures don't have to be defined all in the same `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.SemanticsNodeInteraction).performTouchInput(kotlin.Function1)` block, keep in mind that while the gesture is not complete, all code you execute in between these blocks will be executed while imaginary fingers are actively touching the screen. The events sent as part of the same batch will not be interrupted by recomposition, however, if a gesture spans multiple `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.SemanticsNodeInteraction).performTouchInput(kotlin.Function1)` blocks it is important to remember that recomposition, layout and drawing could take place during the gesture, which may lead to events being injected into a moving target. As pointer positions are manipulated in the current node's local coordinate system, this could lead to issues caused by the fact that part of the gesture will take effect before the rest of the events have been enqueued.

Example of performing a click:

```kotlin
import androidx.compose.ui.test.click
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.performTouchInput

composeTestRule.onNodeWithTag("myComponent").performTouchInput { click() }
```

Example of performing a swipe up:

```kotlin
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.performTouchInput
import androidx.compose.ui.test.swipeUp

composeTestRule.onNodeWithTag("myComponent").performTouchInput { swipeUp() }
```

Example of performing an L-shaped gesture:

```kotlin
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.performTouchInput

composeTestRule.onNodeWithTag("myComponent").performTouchInput {
    down(topLeft)
    moveTo(topLeft + percentOffset(0f, .1f))
    moveTo(topLeft + percentOffset(0f, .2f))
    moveTo(topLeft + percentOffset(0f, .3f))
    moveTo(topLeft + percentOffset(0f, .4f))
    moveTo(centerLeft)
    moveTo(centerLeft + percentOffset(.1f, 0f))
    moveTo(centerLeft + percentOffset(.2f, 0f))
    moveTo(centerLeft + percentOffset(.3f, 0f))
    moveTo(centerLeft + percentOffset(.4f, 0f))
    moveTo(center)
    up()
}
```

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope` |   |

## Summary

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#cancel(kotlin.Long)(delayMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sends a cancel event `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#cancel(kotlin.Long)` after the last sent event to cancel the current gesture. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset?` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#currentPosition(kotlin.Int)(pointerId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the current position of the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#currentPosition(kotlin.Int)`. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#down(androidx.compose.ui.geometry.Offset)(position: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset)` Sends a down event for the default pointer at `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#down(androidx.compose.ui.geometry.Offset)` on the associated node. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#down(kotlin.Int,androidx.compose.ui.geometry.Offset)(pointerId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, position: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset)` Sends a down event for the pointer with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#down(kotlin.Int,androidx.compose.ui.geometry.Offset)` at `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#down(kotlin.Int,androidx.compose.ui.geometry.Offset)` on the associated node. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#move(kotlin.Long)(delayMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sends a move event `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#move(kotlin.Long)` after the last sent event without updating any of the pointer positions. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveBy(androidx.compose.ui.geometry.Offset,kotlin.Long)(delta: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, delayMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sends a move event `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveBy(androidx.compose.ui.geometry.Offset,kotlin.Long)` after the last sent event on the associated node, with the position of the default pointer moved by the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveBy(androidx.compose.ui.geometry.Offset,kotlin.Long)`. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveBy(kotlin.Int,androidx.compose.ui.geometry.Offset,kotlin.Long)(pointerId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, delta: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, delayMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sends a move event `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveBy(kotlin.Int,androidx.compose.ui.geometry.Offset,kotlin.Long)` after the last sent event on the associated node, with the position of the pointer with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveBy(kotlin.Int,androidx.compose.ui.geometry.Offset,kotlin.Long)` moved by the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveBy(kotlin.Int,androidx.compose.ui.geometry.Offset,kotlin.Long)`. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveTo(androidx.compose.ui.geometry.Offset,kotlin.Long)(position: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, delayMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sends a move event `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveTo(androidx.compose.ui.geometry.Offset,kotlin.Long)` after the last sent event on the associated node, with the position of the default pointer updated to `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveTo(androidx.compose.ui.geometry.Offset,kotlin.Long)`. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveTo(kotlin.Int,androidx.compose.ui.geometry.Offset,kotlin.Long)(pointerId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, position: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, delayMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sends a move event `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveTo(kotlin.Int,androidx.compose.ui.geometry.Offset,kotlin.Long)` after the last sent event on the associated node, with the position of the pointer with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveTo(kotlin.Int,androidx.compose.ui.geometry.Offset,kotlin.Long)` updated to `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveTo(kotlin.Int,androidx.compose.ui.geometry.Offset,kotlin.Long)`. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/ui/test/ExperimentalTestApi https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveWithHistory(kotlin.collections.List,kotlin.collections.List,kotlin.Long)( relativeHistoricalTimes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>, historicalCoordinates: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset>, delayMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` Sends a move event `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveWithHistory(kotlin.collections.List,kotlin.collections.List,kotlin.Long)` after the last sent event without updating any of the pointer positions, while adding the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveWithHistory(kotlin.collections.List,kotlin.collections.List,kotlin.Long)` at the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveWithHistory(kotlin.collections.List,kotlin.collections.List,kotlin.Long)` to the move event. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/ui/test/ExperimentalTestApi https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveWithHistoryMultiPointer(kotlin.collections.List,kotlin.collections.List,kotlin.Long)( relativeHistoricalTimes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>, historicalCoordinates: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset>>, delayMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` Sends a move event `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveWithHistoryMultiPointer(kotlin.collections.List,kotlin.collections.List,kotlin.Long)` after the last sent event without updating any of the pointer positions, while adding the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveWithHistoryMultiPointer(kotlin.collections.List,kotlin.collections.List,kotlin.Long)` at the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveWithHistoryMultiPointer(kotlin.collections.List,kotlin.collections.List,kotlin.Long)` to the move event. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#up(kotlin.Int)(pointerId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Sends an up event for the pointer with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#up(kotlin.Int)`, or the default pointer if `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#up(kotlin.Int)` is omitted, on the associated node. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#updatePointerBy(androidx.compose.ui.geometry.Offset)(delta: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset)` Updates the position of the default pointer by the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#updatePointerBy(androidx.compose.ui.geometry.Offset)`, but does not send a move event. | Cmn |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#updatePointerBy(kotlin.Int,androidx.compose.ui.geometry.Offset)(pointerId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, delta: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset)` Updates the position of the pointer with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#updatePointerBy(kotlin.Int,androidx.compose.ui.geometry.Offset)` by the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#updatePointerBy(kotlin.Int,androidx.compose.ui.geometry.Offset)`, but does not send a move event. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#updatePointerTo(kotlin.Int,androidx.compose.ui.geometry.Offset)(pointerId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, position: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset)` Updates the position of the pointer with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#updatePointerTo(kotlin.Int,androidx.compose.ui.geometry.Offset)` to the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#updatePointerTo(kotlin.Int,androidx.compose.ui.geometry.Offset)`, but does not send a move event. | Cmn |

| ### Extension functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#(androidx.compose.ui.test.TouchInjectionScope).click(androidx.compose.ui.geometry.Offset)(position: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset)` Performs a click gesture (aka a tap) on the associated node. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#(androidx.compose.ui.test.TouchInjectionScope).doubleClick(androidx.compose.ui.geometry.Offset,kotlin.Long)(position: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, delayMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Performs a double click gesture (aka a double tap) on the associated node. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#(androidx.compose.ui.test.TouchInjectionScope).longClick(androidx.compose.ui.geometry.Offset,kotlin.Long)(position: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Performs a long click gesture (aka a long press) on the associated node. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#(androidx.compose.ui.test.TouchInjectionScope).multiTouchSwipe(kotlin.collections.List,kotlin.Long,kotlin.collections.List)( curves: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<(timeMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) -> https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset>, durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, keyTimes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html> )` Performs a multi touch swipe gesture on the associated node. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#(androidx.compose.ui.test.TouchInjectionScope).pinch(androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Offset,kotlin.Long)( start0: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, end0: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, start1: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, end1: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` Performs a pinch gesture on the associated node. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#(androidx.compose.ui.test.TouchInjectionScope).swipe(kotlin.Function1,kotlin.Long,kotlin.collections.List)( curve: (timeMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) -> https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, keyTimes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html> )` Performs a swipe gesture on the associated node. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#(androidx.compose.ui.test.TouchInjectionScope).swipe(androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Offset,kotlin.Long)( start: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, end: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` Performs a swipe gesture on the associated node. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#(androidx.compose.ui.test.TouchInjectionScope).swipeDown(kotlin.Float,kotlin.Float,kotlin.Long)( startY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, endY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` Performs a swipe down gesture along `x = [centerX]` of the associated node, from `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeDown(kotlin.Float,kotlin.Float,kotlin.Long)` till `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeDown(kotlin.Float,kotlin.Float,kotlin.Long)`, taking `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeDown(kotlin.Float,kotlin.Float,kotlin.Long)` milliseconds. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#(androidx.compose.ui.test.TouchInjectionScope).swipeLeft(kotlin.Float,kotlin.Float,kotlin.Long)( startX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, endX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` Performs a swipe left gesture along `y = [centerY]` of the associated node, from `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeLeft(kotlin.Float,kotlin.Float,kotlin.Long)` till `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeLeft(kotlin.Float,kotlin.Float,kotlin.Long)`, taking `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeLeft(kotlin.Float,kotlin.Float,kotlin.Long)` milliseconds. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#(androidx.compose.ui.test.TouchInjectionScope).swipeRight(kotlin.Float,kotlin.Float,kotlin.Long)( startX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, endX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` Performs a swipe right gesture along `y = [centerY]` of the associated node, from `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeRight(kotlin.Float,kotlin.Float,kotlin.Long)` till `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeRight(kotlin.Float,kotlin.Float,kotlin.Long)`, taking `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeRight(kotlin.Float,kotlin.Float,kotlin.Long)` milliseconds. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#(androidx.compose.ui.test.TouchInjectionScope).swipeUp(kotlin.Float,kotlin.Float,kotlin.Long)( startY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, endY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` Performs a swipe up gesture along `x = [centerX]` of the associated node, from `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeUp(kotlin.Float,kotlin.Float,kotlin.Long)` till `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeUp(kotlin.Float,kotlin.Float,kotlin.Long)`, taking `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeUp(kotlin.Float,kotlin.Float,kotlin.Long)` milliseconds. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope.https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#(androidx.compose.ui.test.TouchInjectionScope).swipeWithVelocity(androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Offset,kotlin.Float,kotlin.Long)( start: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, end: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset, endVelocity: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html )` Performs a swipe gesture on the associated node such that it ends with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeWithVelocity(androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Offset,kotlin.Float,kotlin.Long)`. | Cmn |

### Inherited functions

From [androidx.compose.ui.unit.Density](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.Dp).roundToPx()()`

Convert `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` to `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` by rounding
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.TextUnit).roundToPx()()`

Convert Sp to `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` by rounding
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(kotlin.Int).toDp()()`

Convert an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` pixel value to `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp`.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(kotlin.Float).toDp()()`

Convert a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` pixel value to a Dp
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpSize` `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.geometry.Size).toDpSize()()`

Convert a `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size` to a `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpSize`.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.Dp).toPx()()`

Convert `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` to pixels.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.TextUnit).toPx()()`

Convert Sp to pixels.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpRect.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.DpRect).toRect()()`

Convert a `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpRect` to a `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect`.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpSize.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.DpSize).toSize()()`

Convert a `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpSize` to a `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size`.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(kotlin.Int).toSp()()`

Convert an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` pixel value to Sp.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(kotlin.Float).toSp()()`

Convert a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` pixel value to a Sp
Cmn From [androidx.compose.ui.unit.FontScaling](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/FontScaling) `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/FontScaling#(androidx.compose.ui.unit.TextUnit).toDp()()`

Convert Sp to `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp`.
Cmn `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp.https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/FontScaling#(androidx.compose.ui.unit.Dp).toSp()()`

Convert `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` to Sp.
Cmn From [androidx.compose.ui.test.InjectionScope](https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#advanceEventTime(kotlin.Long)(durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)`

Adds the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#advanceEventTime(kotlin.Long)` to the current event time, delaying the next event by that time.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#percentOffset(kotlin.Float,kotlin.Float)(x: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, y: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)`

Creates an `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` relative to the size of the node we're interacting with.
Cmn

### Inherited properties

From [androidx.compose.ui.unit.Density](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#density()`

The logical density of the display.
Cmn From [androidx.compose.ui.unit.FontScaling](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/FontScaling) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/FontScaling#fontScale()`

Current user preference for the scaling factor for fonts.
Cmn From [androidx.compose.ui.test.InjectionScope](https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#bottom()`

The y-coordinate for the bottom of the node we're interacting with in px, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#bottomCenter()`

The center of the bottom edge of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#bottomLeft()`

The bottom left corner of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#bottomRight()`

The bottom right corner of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#center()`

The center of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#centerLeft()`

The center of the left edge of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#centerRight()`

The center of the right edge of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#centerX()`

The x-coordinate for the center of the node we're interacting with in px, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#centerY()`

The y-coordinate for the center of the node we're interacting with in px, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#eventPeriodMillis()`

The default time between two successive events.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#height()`

The height of the node in px.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#left()`

The x-coordinate for the left edge of the node we're interacting with in px, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#right()`

The x-coordinate for the right edge of the node we're interacting with in px, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#top()`

The y-coordinate for the top of the node we're interacting with in px, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#topCenter()`

The center of the top edge of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#topLeft()`

The top left corner of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
Cmn `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#topRight()`

The top right corner of the node we're interacting with, in the node's local coordinate system, where (0, 0) is the top left corner of the node.
Cmn `https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/ViewConfiguration` `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#viewConfiguration()`

The `https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/ViewConfiguration` in use by the `https://developer.android.com/reference/kotlin/androidx/compose/ui/semantics/SemanticsNode` from the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/SemanticsNodeInteraction` on which the input injection method is called.
Cmn `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize` `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#visibleSize()`

The size of the visible part of the node we're interacting with in px, i.e. its clipped bounds.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#width()`

The width of the node in px.
Cmn

## Public functions

### cancel

Cmn Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.1.0)

```
fun cancel(delayMillis: Long = eventPeriodMillis): Unit
```

Sends a cancel event `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#cancel(kotlin.Long)` after the last sent event to cancel the current gesture. The cancel event contains the current position of all active pointers.

| Parameters |
|---|---|
| `delayMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = eventPeriodMillis` | The time between the last sent event and this event. `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#eventPeriodMillis()` by default. |

### currentPosition

Cmn Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.1.0)

```
fun currentPosition(pointerId: Int = 0): Offset?
```

Returns the current position of the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#currentPosition(kotlin.Int)`. The default `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#currentPosition(kotlin.Int)` is 0. The position is returned in the local coordinate system of the node with which we're interacting. (0, 0) is the top left corner of the node.

### down

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
open fun down(position: Offset): Unit
```

Sends a down event for the default pointer at `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#down(androidx.compose.ui.geometry.Offset)` on the associated node. The `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#down(androidx.compose.ui.geometry.Offset)` is in the node's local coordinate system, where (0, 0) is the top left corner of the node. The default pointer has `pointerId = 0`.

If no pointers are down yet, this will start a new touch gesture. If a gesture is already in progress, this event is sent at the same timestamp as the last event. If the default pointer is already down, an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` will be thrown.

| Parameters |
|---|---|
| `position: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | The position of the down event, in the node's local coordinate system |

### down

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun down(pointerId: Int, position: Offset): Unit
```

Sends a down event for the pointer with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#down(kotlin.Int,androidx.compose.ui.geometry.Offset)` at `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#down(kotlin.Int,androidx.compose.ui.geometry.Offset)` on the associated node. The `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#down(kotlin.Int,androidx.compose.ui.geometry.Offset)` is in the node's local coordinate system, where (0, 0) is the top left corner of the node.

If no pointers are down yet, this will start a new touch gesture. If a gesture is already in progress, this event is sent at the same timestamp as the last event. If the given pointer is already down, an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` will be thrown.

| Parameters |
|---|---|
| `pointerId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The id of the pointer, can be any number not yet in use by another pointer |
| `position: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | The position of the down event, in the node's local coordinate system |

### move

Cmn Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.1.0)

```
fun move(delayMillis: Long = eventPeriodMillis): Unit
```

Sends a move event `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#move(kotlin.Long)` after the last sent event without updating any of the pointer positions. This can be useful when batching movement of multiple pointers together, which can be done with `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#updatePointerTo(kotlin.Int,androidx.compose.ui.geometry.Offset)` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#updatePointerBy(kotlin.Int,androidx.compose.ui.geometry.Offset)`.

| Parameters |
|---|---|
| `delayMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = eventPeriodMillis` | The time between the last sent event and this event. `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#eventPeriodMillis()` by default. |

### moveBy

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
open fun moveBy(delta: Offset, delayMillis: Long = eventPeriodMillis): Unit
```

Sends a move event `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveBy(androidx.compose.ui.geometry.Offset,kotlin.Long)` after the last sent event on the associated node, with the position of the default pointer moved by the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveBy(androidx.compose.ui.geometry.Offset,kotlin.Long)`. The default pointer has `pointerId = 0`.

If the pointer is not yet down, an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` will be thrown.

| Parameters |
|---|---|
| `delta: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | The position for this move event, relative to the current position of the pointer. For example, \`delta = Offset(10.px, -10.px) will add 10.px to the pointer's x-position, and subtract 10.px from the pointer's y-position. |
| `delayMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = eventPeriodMillis` | The time between the last sent event and this event. `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#eventPeriodMillis()` by default. |

### moveBy

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
open fun moveBy(pointerId: Int, delta: Offset, delayMillis: Long = eventPeriodMillis): Unit
```

Sends a move event `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveBy(kotlin.Int,androidx.compose.ui.geometry.Offset,kotlin.Long)` after the last sent event on the associated node, with the position of the pointer with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveBy(kotlin.Int,androidx.compose.ui.geometry.Offset,kotlin.Long)` moved by the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveBy(kotlin.Int,androidx.compose.ui.geometry.Offset,kotlin.Long)`.

If the pointer is not yet down, an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` will be thrown.

| Parameters |
|---|---|
| `pointerId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The id of the pointer to move, as supplied in `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#down(kotlin.Int,androidx.compose.ui.geometry.Offset)` |
| `delta: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | The position for this move event, relative to the current position of the pointer. For example, \`delta = Offset(10.px, -10.px) will add 10.px to the pointer's x-position, and subtract 10.px from the pointer's y-position. |
| `delayMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = eventPeriodMillis` | The time between the last sent event and this event. `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#eventPeriodMillis()` by default. |

### moveTo

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
open fun moveTo(position: Offset, delayMillis: Long = eventPeriodMillis): Unit
```

Sends a move event `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveTo(androidx.compose.ui.geometry.Offset,kotlin.Long)` after the last sent event on the associated node, with the position of the default pointer updated to `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveTo(androidx.compose.ui.geometry.Offset,kotlin.Long)`. The `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveTo(androidx.compose.ui.geometry.Offset,kotlin.Long)` is in the node's local coordinate system, where (0, 0) is the top left corner of the node. The default pointer has `pointerId = 0`.

If the default pointer is not yet down, an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` will be thrown.

| Parameters |
|---|---|
| `position: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | The new position of the pointer, in the node's local coordinate system |
| `delayMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = eventPeriodMillis` | The time between the last sent event and this event. `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#eventPeriodMillis()` by default. |

### moveTo

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
open fun moveTo(
    pointerId: Int,
    position: Offset,
    delayMillis: Long = eventPeriodMillis
): Unit
```

Sends a move event `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveTo(kotlin.Int,androidx.compose.ui.geometry.Offset,kotlin.Long)` after the last sent event on the associated node, with the position of the pointer with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveTo(kotlin.Int,androidx.compose.ui.geometry.Offset,kotlin.Long)` updated to `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveTo(kotlin.Int,androidx.compose.ui.geometry.Offset,kotlin.Long)`. The `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveTo(kotlin.Int,androidx.compose.ui.geometry.Offset,kotlin.Long)` is in the node's local coordinate system, where (0, 0) is the top left corner of the node.

If the pointer is not yet down, an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` will be thrown.

| Parameters |
|---|---|
| `pointerId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The id of the pointer to move, as supplied in `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#down(kotlin.Int,androidx.compose.ui.geometry.Offset)` |
| `position: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | The new position of the pointer, in the node's local coordinate system |
| `delayMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = eventPeriodMillis` | The time between the last sent event and this event. `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#eventPeriodMillis()` by default. |

### moveWithHistory

Cmn Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.1.0)

```
@ExperimentalTestApi
open fun moveWithHistory(
    relativeHistoricalTimes: List<Long>,
    historicalCoordinates: List<Offset>,
    delayMillis: Long = eventPeriodMillis
): Unit
```

Sends a move event `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveWithHistory(kotlin.collections.List,kotlin.collections.List,kotlin.Long)` after the last sent event without updating any of the pointer positions, while adding the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveWithHistory(kotlin.collections.List,kotlin.collections.List,kotlin.Long)` at the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveWithHistory(kotlin.collections.List,kotlin.collections.List,kotlin.Long)` to the move event. This corresponds to the scenario where a touch screen generates touch events quicker than can be dispatched and batches them together.

This overload is a convenience method for the common case where the gesture only has one pointer.

| Parameters |
|---|---|
| `relativeHistoricalTimes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>` | Time of each historical event, as a millisecond relative to the time the actual event is sent. For example, -10L means 10ms earlier. |
| `historicalCoordinates: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset>` | Coordinates of each historical event, in the same coordinate space as `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveTo(kotlin.Int,androidx.compose.ui.geometry.Offset,kotlin.Long)`. The list must have the same size as `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveWithHistory(kotlin.collections.List,kotlin.collections.List,kotlin.Long)`. |
| `delayMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = eventPeriodMillis` | The time between the last sent event and this event. `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#eventPeriodMillis()` by default. |

### moveWithHistoryMultiPointer

Cmn

```
@ExperimentalTestApi
fun moveWithHistoryMultiPointer(
    relativeHistoricalTimes: List<Long>,
    historicalCoordinates: List<List<Offset>>,
    delayMillis: Long = eventPeriodMillis
): Unit
```

Sends a move event `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveWithHistoryMultiPointer(kotlin.collections.List,kotlin.collections.List,kotlin.Long)` after the last sent event without updating any of the pointer positions, while adding the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveWithHistoryMultiPointer(kotlin.collections.List,kotlin.collections.List,kotlin.Long)` at the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveWithHistoryMultiPointer(kotlin.collections.List,kotlin.collections.List,kotlin.Long)` to the move event. This corresponds to the scenario where a touch screen generates touch events quicker than can be dispatched and batches them together.

```kotlin
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.test.ExperimentalTestApi
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.performTouchInput

// Move two fingers in a horizontal line, one on y=100 and one on y=500
composeTestRule.onNodeWithTag("myComponent").performTouchInput {
    // First, make contact with the screen with both pointers:
    down(0, Offset(300f, 100f))
    down(1, Offset(300f, 500f))
    // Update the pointer locations for the next event
    updatePointerTo(0, Offset(400f, 100f))
    updatePointerTo(1, Offset(400f, 500f))
    // And send the move event with historical data
    @OptIn(ExperimentalTestApi::class)
    moveWithHistoryMultiPointer(
        // Let's add 3 historical events
        relativeHistoricalTimes = listOf(-12, -8, -4),
        // Now, for each pointer we supply the historical coordinates
        historicalCoordinates =
            listOf(
                // Pointer 0 moves along y=100
                listOf(Offset(325f, 100f), Offset(350f, 100f), Offset(375f, 100f)),
                // Pointer 1 moves along y=500
                listOf(Offset(325f, 500f), Offset(350f, 500f), Offset(375f, 500f)),
            ),
        // The actual move event will be sent 16ms after the previous event
        delayMillis = 16,
    )
    // And finish the gesture by lifting both fingers. Can be done in any order
    up(1)
    up(0)
}
```

| Parameters |
|---|---|
| `relativeHistoricalTimes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html>` | Time of each historical event, as a millisecond relative to the time the actual event is sent. For example, -10L means 10ms earlier. |
| `historicalCoordinates: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset>>` | Coordinates of each historical event, in the same coordinate space as `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveTo(kotlin.Int,androidx.compose.ui.geometry.Offset,kotlin.Long)`. The outer list must have the same size as the number of pointers in the event, and each inner list must have the same size as `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#moveWithHistoryMultiPointer(kotlin.collections.List,kotlin.collections.List,kotlin.Long)`. The `i`th pointer is assigned the `i`th history, with the pointers sorted on ascending pointerId. |
| `delayMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = eventPeriodMillis` | The time between the last sent event and this event. `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#eventPeriodMillis()` by default. |

### up

Cmn Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.1.0)

```
fun up(pointerId: Int = 0): Unit
```

Sends an up event for the pointer with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#up(kotlin.Int)`, or the default pointer if `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#up(kotlin.Int)` is omitted, on the associated node.

| Parameters |
|---|---|
| `pointerId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = 0` | The id of the pointer to lift up, as supplied in `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#down(kotlin.Int,androidx.compose.ui.geometry.Offset)` |

### updatePointerBy

Cmn Added in [1.12.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.12.0)

```
open fun updatePointerBy(delta: Offset): Unit
```

Updates the position of the default pointer by the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#updatePointerBy(androidx.compose.ui.geometry.Offset)`, but does not send a move event. The move event can be sent with `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#move(kotlin.Long)`. The default pointer is `pointerId = 0`.

If the pointer is not yet down, an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` will be thrown.

| Parameters |
|---|---|
| `delta: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | The position for this move event, relative to the last sent position of the pointer. For example, \`delta = Offset(10.px, -10.px) will add 10.px to the pointer's x-position, and subtract 10.px from the pointer's y-position. |

### updatePointerBy

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
open fun updatePointerBy(pointerId: Int, delta: Offset): Unit
```

Updates the position of the pointer with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#updatePointerBy(kotlin.Int,androidx.compose.ui.geometry.Offset)` by the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#updatePointerBy(kotlin.Int,androidx.compose.ui.geometry.Offset)`, but does not send a move event. The move event can be sent with `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#move(kotlin.Long)`.

If the pointer is not yet down, an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` will be thrown.

| Parameters |
|---|---|
| `pointerId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The id of the pointer to move, as supplied in `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#down(kotlin.Int,androidx.compose.ui.geometry.Offset)` |
| `delta: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | The position for this move event, relative to the last sent position of the pointer. For example, \`delta = Offset(10.px, -10.px) will add 10.px to the pointer's x-position, and subtract 10.px from the pointer's y-position. |

### updatePointerTo

Cmn Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.10.0)

```
fun updatePointerTo(pointerId: Int, position: Offset): Unit
```

Updates the position of the pointer with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#updatePointerTo(kotlin.Int,androidx.compose.ui.geometry.Offset)` to the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#updatePointerTo(kotlin.Int,androidx.compose.ui.geometry.Offset)`, but does not send a move event. The move event can be sent with `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#move(kotlin.Long)`. The `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#updatePointerTo(kotlin.Int,androidx.compose.ui.geometry.Offset)` is in the node's local coordinate system, where (0.px, 0.px) is the top left corner of the node.

If the pointer is not yet down, an `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` will be thrown.

| Parameters |
|---|---|
| `pointerId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | The id of the pointer to move, as supplied in `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/TouchInjectionScope#down(kotlin.Int,androidx.compose.ui.geometry.Offset)` |
| `position: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | The new position of the pointer, in the node's local coordinate system |

## Extension functions

### TouchInjectionScope.click

Cmn Artifact: [androidx.compose.ui:ui-test](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/test/TouchInjectionScope.kt+function:click)

```
fun TouchInjectionScope.click(position: Offset = center): Unit
```

Performs a click gesture (aka a tap) on the associated node.

The click is done at the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).click(androidx.compose.ui.geometry.Offset)`, or in the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#center()` if the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).click(androidx.compose.ui.geometry.Offset)` is omitted. The `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).click(androidx.compose.ui.geometry.Offset)` is in the node's local coordinate system, where (0, 0) is the top left corner of the node.

| Parameters |
|---|---|
| `position: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset = center` | The position where to click, in the node's local coordinate system. If omitted, the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#center()` of the node will be used. |

### TouchInjectionScope.doubleClick

Cmn Artifact: [androidx.compose.ui:ui-test](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/test/TouchInjectionScope.kt+function:doubleClick)

```
fun TouchInjectionScope.doubleClick(
    position: Offset = center,
    delayMillis: Long = viewConfiguration.defaultDoubleTapDelayMillis
): Unit
```

Performs a double click gesture (aka a double tap) on the associated node.

The double click is done at the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).doubleClick(androidx.compose.ui.geometry.Offset,kotlin.Long)` or in the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#center()` if the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).doubleClick(androidx.compose.ui.geometry.Offset,kotlin.Long)` is omitted. By default, the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).doubleClick(androidx.compose.ui.geometry.Offset,kotlin.Long)` between the first and the second click is half way in between the minimum and maximum required delay for a double click. The `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).doubleClick(androidx.compose.ui.geometry.Offset,kotlin.Long)` is in the node's local coordinate system, where (0, 0) is the top left corner of the node.

| Parameters |
|---|---|
| `position: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset = center` | The position of the double click, in the node's local coordinate system. If omitted, the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#center()` position will be used. |
| `delayMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = viewConfiguration.defaultDoubleTapDelayMillis` | The time between the up event of the first click and the down event of the second click |

### TouchInjectionScope.longClick

Cmn Artifact: [androidx.compose.ui:ui-test](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/test/TouchInjectionScope.kt+function:longClick)

```
fun TouchInjectionScope.longClick(
    position: Offset = center,
    durationMillis: Long = viewConfiguration.longPressTimeoutMillis + 100
): Unit
```

Performs a long click gesture (aka a long press) on the associated node.

The long click is done at the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).longClick(androidx.compose.ui.geometry.Offset,kotlin.Long)`, or in the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#center()` if the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).longClick(androidx.compose.ui.geometry.Offset,kotlin.Long)` is omitted. By default, the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).longClick(androidx.compose.ui.geometry.Offset,kotlin.Long)` of the press is 100ms longer than the minimum required duration for a long press. The `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).longClick(androidx.compose.ui.geometry.Offset,kotlin.Long)` is in the node's local coordinate system, where (0, 0) is the top left corner of the node.

| Parameters |
|---|---|
| `position: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset = center` | The position of the long click, in the node's local coordinate system. If omitted, the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#center()` of the node will be used. |
| `durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = viewConfiguration.longPressTimeoutMillis + 100` | The time between the down and the up event |

### TouchInjectionScope.multiTouchSwipe

Cmn Artifact: [androidx.compose.ui:ui-test](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/test/TouchInjectionScope.kt+function:multiTouchSwipe)

```
fun TouchInjectionScope.multiTouchSwipe(
    curves: List<(timeMillis: Long) -> Offset>,
    durationMillis: Long = 200,
    keyTimes: List<Long> = emptyList()
): Unit
```

Performs a multi touch swipe gesture on the associated node.

Each pointer follows `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).multiTouchSwipe(kotlin.collections.List,kotlin.Long,kotlin.collections.List)`\[i\] from 0 till `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).multiTouchSwipe(kotlin.collections.List,kotlin.Long,kotlin.collections.List)`. Sampling of an event is forced at all times defined in `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).multiTouchSwipe(kotlin.collections.List,kotlin.Long,kotlin.collections.List)`. The time between events is kept as close to `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#eventPeriodMillis()` as possible, given the constraints. The coordinates are in the node's local coordinate system, where (0, 0) is the top left corner of the node. The default duration is 200 milliseconds.

| Parameters |
|---|---|
| `curves: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<(timeMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) -> https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset>` | The functions that describe the gesture. Function *i* defines the position over time for pointer id *i*. The argument passed to each function is the time in milliseconds since the start of the swipe, and the return value is the location of that pointer at that point in time. |
| `durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = 200` | The duration of the gesture |
| `keyTimes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html> = emptyList()` | An optional list of timestamps in milliseconds at which a move event must be sampled |

### TouchInjectionScope.pinch

Cmn Artifact: [androidx.compose.ui:ui-test](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/test/TouchInjectionScope.kt+function:pinch)

```
fun TouchInjectionScope.pinch(
    start0: Offset,
    end0: Offset,
    start1: Offset,
    end1: Offset,
    durationMillis: Long = 400
): Unit
```

Performs a pinch gesture on the associated node.

For each pair of start and end `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset`s, the motion events are linearly interpolated. The coordinates are in the node's local coordinate system where (0, 0) is the top left corner of the node. The default duration is 400 milliseconds.

| Parameters |
|---|---|
| `start0: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | The start position of the first gesture in the node's local coordinate system |
| `end0: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | The end position of the first gesture in the node's local coordinate system |
| `start1: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | The start position of the second gesture in the node's local coordinate system |
| `end1: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | The end position of the second gesture in the node's local coordinate system |
| `durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = 400` | the duration of the gesture |

### TouchInjectionScope.swipe

Cmn Artifact: [androidx.compose.ui:ui-test](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/test/TouchInjectionScope.kt+function:swipe)

```
fun TouchInjectionScope.swipe(
    curve: (timeMillis: Long) -> Offset,
    durationMillis: Long = 200,
    keyTimes: List<Long> = emptyList()
): Unit
```

Performs a swipe gesture on the associated node.

The swipe follows the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipe(kotlin.Function1,kotlin.Long,kotlin.collections.List)` from 0 till `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipe(kotlin.Function1,kotlin.Long,kotlin.collections.List)`. Will force sampling of an event at all times defined in `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipe(kotlin.Function1,kotlin.Long,kotlin.collections.List)`. The time between events is kept as close to `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#eventPeriodMillis()` as possible, given the constraints. The coordinates are in the node's local coordinate system, where (0, 0) is the top left corner of the node. The default duration is 200 milliseconds.

| Parameters |
|---|---|
| `curve: (timeMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) -> https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | The function that describes the gesture. The argument passed to the function is the time in milliseconds since the start of the swipe, and the return value is the location of the pointer at that point in time. |
| `durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = 200` | The duration of the gesture |
| `keyTimes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html> = emptyList()` | An optional list of timestamps in milliseconds at which a move event must be sampled |

### TouchInjectionScope.swipe

Cmn Artifact: [androidx.compose.ui:ui-test](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/test/TouchInjectionScope.kt+function:swipe)

```
fun TouchInjectionScope.swipe(
    start: Offset,
    end: Offset,
    durationMillis: Long = 200
): Unit
```

Performs a swipe gesture on the associated node.

The motion events are linearly interpolated between `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipe(androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Offset,kotlin.Long)` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipe(androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Offset,kotlin.Long)`. The coordinates are in the node's local coordinate system, where (0, 0) is the top left corner of the node. The default duration is 200 milliseconds.

| Parameters |
|---|---|
| `start: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | The start position of the gesture, in the node's local coordinate system |
| `end: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | The end position of the gesture, in the node's local coordinate system |
| `durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = 200` | The duration of the gesture |

### TouchInjectionScope.swipeDown

Cmn Artifact: [androidx.compose.ui:ui-test](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/test/TouchInjectionScope.kt+function:swipeDown)

```
fun TouchInjectionScope.swipeDown(
    startY: Float = top,
    endY: Float = bottom,
    durationMillis: Long = 200
): Unit
```

Performs a swipe down gesture along `x = [centerX]` of the associated node, from `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeDown(kotlin.Float,kotlin.Float,kotlin.Long)` till `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeDown(kotlin.Float,kotlin.Float,kotlin.Long)`, taking `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeDown(kotlin.Float,kotlin.Float,kotlin.Long)` milliseconds.

| Parameters |
|---|---|
| `startY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = top` | The y-coordinate of the start of the swipe. Must be less than or equal to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeDown(kotlin.Float,kotlin.Float,kotlin.Long)`. By default the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#top()` of the node. |
| `endY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = bottom` | The y-coordinate of the end of the swipe. Must be greater than or equal to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeDown(kotlin.Float,kotlin.Float,kotlin.Long)`. By default the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#bottom()` of the node. |
| `durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = 200` | The duration of the swipe. By default 200 milliseconds. |

### TouchInjectionScope.swipeLeft

Cmn Artifact: [androidx.compose.ui:ui-test](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/test/TouchInjectionScope.kt+function:swipeLeft)

```
fun TouchInjectionScope.swipeLeft(
    startX: Float = right,
    endX: Float = left,
    durationMillis: Long = 200
): Unit
```

Performs a swipe left gesture along `y = [centerY]` of the associated node, from `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeLeft(kotlin.Float,kotlin.Float,kotlin.Long)` till `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeLeft(kotlin.Float,kotlin.Float,kotlin.Long)`, taking `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeLeft(kotlin.Float,kotlin.Float,kotlin.Long)` milliseconds.

| Parameters |
|---|---|
| `startX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = right` | The x-coordinate of the start of the swipe. Must be greater than or equal to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeLeft(kotlin.Float,kotlin.Float,kotlin.Long)`. By default the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#right()` of the node. |
| `endX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = left` | The x-coordinate of the end of the swipe. Must be less than or equal to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeLeft(kotlin.Float,kotlin.Float,kotlin.Long)`. By default the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#left()` of the node. |
| `durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = 200` | The duration of the swipe. By default 200 milliseconds. |

### TouchInjectionScope.swipeRight

Cmn Artifact: [androidx.compose.ui:ui-test](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/test/TouchInjectionScope.kt+function:swipeRight)

```
fun TouchInjectionScope.swipeRight(
    startX: Float = left,
    endX: Float = right,
    durationMillis: Long = 200
): Unit
```

Performs a swipe right gesture along `y = [centerY]` of the associated node, from `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeRight(kotlin.Float,kotlin.Float,kotlin.Long)` till `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeRight(kotlin.Float,kotlin.Float,kotlin.Long)`, taking `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeRight(kotlin.Float,kotlin.Float,kotlin.Long)` milliseconds.

| Parameters |
|---|---|
| `startX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = left` | The x-coordinate of the start of the swipe. Must be less than or equal to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeRight(kotlin.Float,kotlin.Float,kotlin.Long)`. By default the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#left()` of the node. |
| `endX: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = right` | The x-coordinate of the end of the swipe. Must be greater than or equal to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeRight(kotlin.Float,kotlin.Float,kotlin.Long)`. By default the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#right()` of the node. |
| `durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = 200` | The duration of the swipe. By default 200 milliseconds. |

### TouchInjectionScope.swipeUp

Cmn Artifact: [androidx.compose.ui:ui-test](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/test/TouchInjectionScope.kt+function:swipeUp)

```
fun TouchInjectionScope.swipeUp(
    startY: Float = bottom,
    endY: Float = top,
    durationMillis: Long = 200
): Unit
```

Performs a swipe up gesture along `x = [centerX]` of the associated node, from `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeUp(kotlin.Float,kotlin.Float,kotlin.Long)` till `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeUp(kotlin.Float,kotlin.Float,kotlin.Long)`, taking `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeUp(kotlin.Float,kotlin.Float,kotlin.Long)` milliseconds.

| Parameters |
|---|---|
| `startY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = bottom` | The y-coordinate of the start of the swipe. Must be greater than or equal to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeUp(kotlin.Float,kotlin.Float,kotlin.Long)`. By default the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#bottom()` of the node. |
| `endY: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = top` | The y-coordinate of the end of the swipe. Must be less than or equal to the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeUp(kotlin.Float,kotlin.Float,kotlin.Long)`. By default the `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/InjectionScope#top()` of the node. |
| `durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = 200` | The duration of the swipe. By default 200 milliseconds. |

### TouchInjectionScope.swipeWithVelocity

Cmn Artifact: [androidx.compose.ui:ui-test](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/test/TouchInjectionScope.kt+function:swipeWithVelocity)

```
fun TouchInjectionScope.swipeWithVelocity(
    start: Offset,
    end: Offset,
    endVelocity: Float,
    durationMillis: Long = VelocityPathFinder.calculateDefaultDuration(start, end, endVelocity)
): Unit
```

Performs a swipe gesture on the associated node such that it ends with the given `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeWithVelocity(androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Offset,kotlin.Float,kotlin.Long)`.

The swipe will go through `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeWithVelocity(androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Offset,kotlin.Float,kotlin.Long)` at t=0 and through `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeWithVelocity(androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Offset,kotlin.Float,kotlin.Long)` at t=`https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeWithVelocity(androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Offset,kotlin.Float,kotlin.Long)`. In between, the swipe will go monotonically from `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeWithVelocity(androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Offset,kotlin.Float,kotlin.Long)` and `https://developer.android.com/reference/kotlin/androidx/compose/ui/test/package-summary#(androidx.compose.ui.test.TouchInjectionScope).swipeWithVelocity(androidx.compose.ui.geometry.Offset,androidx.compose.ui.geometry.Offset,kotlin.Float,kotlin.Long)`, but not strictly. Due to imprecision, no guarantees can be made for the actual velocity at the end of the gesture, but generally it is within 0.1 of the desired velocity.

When a swipe cannot be created that results in the desired velocity (because the input is too restrictive), an exception will be thrown with suggestions to fix the input.

The coordinates are in the node's local coordinate system, where (0, 0) is the top left corner of the node. The default duration is calculated such that a feasible swipe can be created that ends in the given velocity.

| Parameters |
|---|---|
| `start: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | The start position of the gesture, in the node's local coordinate system |
| `end: https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Offset` | The end position of the gesture, in the node's local coordinate system |
| `endVelocity: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | The velocity of the gesture at the moment it ends in px/second. Must be positive. |
| `durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html = VelocityPathFinder.calculateDefaultDuration(start, end, endVelocity)` | The duration of the gesture in milliseconds. Must be long enough that at least 3 input events are generated, which happens with a duration of 40ms or more. If omitted, a duration is calculated such that a valid swipe with velocity can be created. |

| Throws |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html` | When no swipe can be generated that will result in the desired velocity. The error message will suggest changes to the input parameters such that a swipe will become feasible. |