<div class='type'>Function</div>


<a id='references'></a>


<h2 id="animatemoveto-position-durationmillis">animateMoveTo</h2>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun TrackpadInjectionScope.animateMoveTo(
    position: Offset,
    durationMillis: Long = DefaultTrackpadGestureDurationMillis,
)
```


Move the trackpad from the `current position` to the
given `position`, sending a stream of move events to get an animated path of `durationMillis`
milliseconds. `Move` the trackpad to the desired start position if you want to start from
a different position. The `position` is in the node's local coordinate system, where (0, 0) is
the top left corner of the node.

Example of moving the trackpad along a line:

#### Parameters

| | |
| --- | --- |
| position | The position where to move the trackpad to, in the node's local coordinate system |
| durationMillis | The duration of the gesture. By default 300 milliseconds. |






<hr class="docs-overload-divider">


<h2 id="animatemoveto-position-durationmillis-2">animateMoveTo</h2>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun MouseInjectionScope.animateMoveTo(
    position: Offset,
    durationMillis: Long = DefaultMouseGestureDurationMillis,
)
```


Move the mouse from the `current position` to the given
`position`, sending a stream of move events to get an animated path of `durationMillis`
milliseconds. `Move` the mouse to the desired start position if you want to start from a
different position. The `position` is in the node's local coordinate system, where (0, 0) is the
top left corner of the node.

Example of moving the mouse along a line:

#### Parameters

| | |
| --- | --- |
| position | The position where to move the mouse to, in the node's local coordinate system |
| durationMillis | The duration of the gesture. By default 300 milliseconds. |