---
title: "indexOfLastPressed"
description: "Returns the index of last button pressed as used in [isPressed] or `-1` if no button is pressed."
type: "function"
---

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


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


```kotlin
expect fun PointerButtons.indexOfLastPressed(): Int
```


Returns the index of last button pressed as used in `isPressed` or `-1` if no button is pressed.



<div class='sourceset sourceset-android'>Android</div>


```kotlin
actual fun PointerButtons.indexOfLastPressed(): Int
```


