---
title: "doubleClick"
description: "Use [button] to double-click on [position], or on the current trackpad position if [position] is
[unspecified][Offset.Unspecified]. The [position] is in the node's local coordinate system, where
(0, 0) is the top left corner of the node. The default [button] is the
[primary][TrackpadButton.Primary] button."
type: "function"
---

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


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun TrackpadInjectionScope.doubleClick(
    position: Offset = center,
    button: TrackpadButton = TrackpadButton.Primary,
)
```


Use `button` to double-click on `position`, or on the current trackpad position if `position` is
`unspecified`. The `position` is in the node's local coordinate system, where
(0, 0) is the top left corner of the node. The default `button` is the
`primary` button.

#### Parameters

| | |
| --- | --- |
| position | The position where to click, in the node's local coordinate system. If omitted, the `center` of the node will be used. If `unspecified`, clicks on the current trackpad position. |
| button | The button to click with. Uses the `primary` by default. |




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


```kotlin
fun MouseInjectionScope.doubleClick(
    position: Offset = center,
    button: MouseButton = MouseButton.Primary,
)
```


Use `button` to double-click on `position`, or on the current mouse position if `position` is
`unspecified`. The `position` is in the node's local coordinate system, where
(0, 0) is the top left corner of the node. The default `button` is the
`primary` button.

#### Parameters

| | |
| --- | --- |
| position | The position where to click, in the node's local coordinate system. If omitted, the `center` of the node will be used. If `unspecified`, clicks on the current mouse position. |
| button | The button to click with. Uses the `primary` by default. |




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


> **Deprecated** Replaced by TouchInjectionScope. Use `performTouchInput` instead of `performGesture`

```kotlin
fun GestureScope.doubleClick(
    position: Offset = center,
    delayMillis: Long = doubleClickDelayMillis,
) = delegateScope.touch { doubleClick(position, delayMillis) }
```


Performs a double click gesture at the given `position` on the associated node, or in the center
if the `position` is omitted. By default, the `delayMillis` between the first and the second
click is 145 milliseconds (empirically established). The `position` is in the node's local
coordinate system, where (0, 0) is the top left corner of the node.

#### Parameters

| | |
| --- | --- |
| position | The position of the double click, in the node's local coordinate system. If omitted, the center position will be used. |
| delayMillis | The time between the up event of the first click and the down event of the second click |




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


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


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

The double click is done at the given `position` or in the `center` if the `position` is omitted.
By default, the `delayMillis` between the first and the second click is half way in between the
minimum and maximum required delay for a double click. The `position` is in the node's local
coordinate system, where (0, 0) is the top left corner of the node.

#### Parameters

| | |
| --- | --- |
| position | The position of the double click, in the node's local coordinate system. If omitted, the `center` position will be used. |
| delayMillis | The time between the up event of the first click and the down event of the second click |




