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

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

Receiver scope for [detectTapGestures](/jetpack-compose/androidx.compose.foundation/foundation/interfaces/PressGestureScope)'s `onPress` lambda. This offers two methods to allow
waiting for the press to be released.

## Functions

<h2 id="awaitrelease">awaitRelease</h2>

```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](/jetpack-compose/androidx.compose.foundation/foundation/classes/GestureCancellationException) will be thrown.

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

<h2 id="tryawaitrelease">tryAwaitRelease</h2>

```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.