# when (A) button pressed (micro:bit) — Scratch Block Guide > Runs a Scratch script when physical button A or B on a connected micro:bit is pressed. How to use the "when (A) button pressed (micro:bit)" block in Scratch 3.0 (Extensions): clear explanation, working block example, and debugging tips. ## What this block does Runs a Scratch script when physical button A or B on a connected micro:bit is pressed. Use a real micro:bit as a wireless game controller for jumping or firing. - Category: Extensions - Key tip: Requires Scratch Link and the official Scratch micro:bit HEX firmware. ## Working Scratch example Try building this small script in the Scratch editor, predict what will happen, then click the green flag to test it. **Example using when (A) button pressed (micro:bit)** - When (A) button pressed - Change y by (30) - Start sound (Boing) Try it: Pressing physical button A makes your Scratch character jump. ## Related block guides Explore other blocks in the same category or return to the full English Block Dictionary. - [Back to Extensions](/en/dictionary/extensions/): See the overview and patterns for Extensions. - [Scratch Block Dictionary (All Categories)](/en/dictionary/): Browse Motion, Looks, Sound, Events, Control, Sensing, Operators, Variables, and Extensions. Updated: 2026-11-23 Author: [Takamasa Suzuki](https://scratch.gmnavi.jp/about/author/) Japanese Edition: https://scratch.gmnavi.jp/dictionary/extensions/microbit-button-event/ [Scratch Daizen (English)](https://scratch.gmnavi.jp/en/)