Clock.png This article or section contains information about a feature from a future version of Scratch that is unreleased and is subject to change. Please cite any additional info in order to prevent speculation.
When () button pressed
When () button pressed.PNG
Category Event, micro:bit
Type Hat

The When () button pressed block is a hat block used as part of the Micro:bit extension. When either the A button or the B button is pressed, this block triggers an event.

Example uses

When () button pressed example use 1.PNG Triggering an event on the micro:bit

When () button pressed example use 2.PNG Triggering an event on the project's stage.