# Is there a JustDown function for gamepad?

**URL:** <https://phaser.discourse.group/t/is-there-a-justdown-function-for-gamepad/5094>\
**Category:** Phaser 3\
**Created:** [February 6, 2020, 8:22pm UTC](https://phaser.discourse.group/t/is-there-a-justdown-function-for-gamepad/5094 "2020-02-06T20:22:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HintonR](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/hintonr/32/2740_2.png) [@HintonR](https://phaser.discourse.group/u/HintonR)\
**Post date:** [February 6, 2020, 8:22pm UTC](https://phaser.discourse.group/t/is-there-a-justdown-function-for-gamepad/5094/1 "2020-02-06T20:22:32Z")

</div>

Hi There,

I’m fairly new and not experienced enough to write a custom event that would listen for this kind of input – but I was wondering if there was a function for gamepad that is similar to Phaser.Input.Keyboard.JustDown() – because the basic gamepad.BUTTON (i.e. - gamepad.a) functions like an isDown command.

I would like a single read button press for gamepad input

If not possible, could I get tips on how to create an event listener to function the same way?

Thank you kindly.

---

<div class="post-metadata">

**Author:** ![snowbillr](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/snowbillr/32/332_2.png) [@snowbillr](https://phaser.discourse.group/u/snowbillr)\
**Post date:** [February 6, 2020, 8:40pm UTC](https://phaser.discourse.group/t/is-there-a-justdown-function-for-gamepad/5094/2 "2020-02-06T20:40:34Z")

</div>

I haven’t used the gamepad before, but I can’t find a method like you’re asking for in the docs: [https://photonstorm.github.io/phaser3-docs/Phaser.Input.Gamepad.Button.html](https://photonstorm.github.io/phaser3-docs/Phaser.Input.Gamepad.Button.html)

Closest I see is for checking if a button is currently down.[https://photonstorm.github.io/phaser3-docs/Phaser.Input.Gamepad.Gamepad.html#isButtonDown\_\_anchor](https://photonstorm.github.io/phaser3-docs/Phaser.Input.Gamepad.Gamepad.html#isButtonDown__anchor) or [https://photonstorm.github.io/phaser3-docs/Phaser.Input.Gamepad.Button.html#pressed\_\_anchor](https://photonstorm.github.io/phaser3-docs/Phaser.Input.Gamepad.Button.html#pressed__anchor)

---

<div class="post-metadata">

**Author:** ![HintonR](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/hintonr/32/2740_2.png) [@HintonR](https://phaser.discourse.group/u/HintonR)\
**Post date:** [February 10, 2020, 10:28am UTC](https://phaser.discourse.group/t/is-there-a-justdown-function-for-gamepad/5094/3 "2020-02-10T10:28:18Z")

</div>

I see, thank you for the reply.

Since the input was based on an animation, in cases where I didn’t want them to spam a button and have the first frame play said amount of times… I just created an animation complete flag.
