---
title: "PressGestureScope"
description: "Receiver scope for [detectTapGestures]'s `onPress` lambda. This offers two methods to allow
waiting for the press to be released."
type: "interface"
---

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


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

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



```kotlin
@JvmDefaultWithCompatibility
interface PressGestureScope : Density
```


Receiver scope for `detectTapGestures`'s `onPress` lambda. This offers two methods to allow
waiting for the press to be released.


## Functions

```kotlin
suspend fun awaitRelease()
```


Waits for the press to be released before returning. If the gesture was canceled by motion
being consumed by another gesture, `GestureCancellationException` will be thrown.


```kotlin
suspend fun tryAwaitRelease(): Boolean
```


Waits for the press to be released before returning. If the press was released, `true` is
returned, or if the gesture was canceled by motion being consumed by another gesture, `false`
is returned.



