# button Control repeat

**URL:** <https://forum.makecode.com/t/button-control-repeat/39551>\
**Category:** Help\
**Tags:** game\
**Created:** [September 29, 2025, 5:11pm UTC](https://forum.makecode.com/t/button-control-repeat/39551 "2025-09-29T17:11:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dvplayzty](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dvplayzty/32/22324_2.png) [@Dvplayzty](https://forum.makecode.com/u/Dvplayzty)\
**Post date:** [September 29, 2025, 5:11pm UTC](https://forum.makecode.com/t/button-control-repeat/39551/1 "2025-09-29T17:11:05Z")

</div>

When I use “On A button repeat“ and hold A then the code runs after a few ms. How to make it so that as soon as you press it starts and the code should loop while the button is hold.

> **[test](https://arcade.makecode.com/S52342-37538-33964-25781)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [September 29, 2025, 5:12pm UTC](https://forum.makecode.com/t/button-control-repeat/39551/2 "2025-09-29T17:12:51Z")

</div>

add the “Controller” extension to your project:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/5/1/51058799aaae50534b26e3e8e650d7fad3babbf6.png)

and then grab this block from the Controller category and set the button repeat delay to 0:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/3/f/3ffc4627c36d8978a7d9e68d1e68350b41e3c811.png)
