# key (space) pressed? — Scratch Block Guide > Boolean block that is true for the entire time the chosen key is held down. How to use the "key (space) pressed?" block in Scratch 3.0 (Sensing Blocks): clear explanation, working block example, and debugging tips. ## What this block does Boolean block that is true for the entire time the chosen key is held down. Pair with "forever" and "if" for responsive, lag-free game movement. - Category: Sensing Blocks - Key tip: You can even detect diagonal movement by checking left/right and up/down in separate "if" blocks. ## 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 key (space) pressed?** - When green flag clicked - Forever - If then - Change y by (5) Try it: Moves smoothly upward while the Up arrow is held. ## Related block guides Explore other blocks in the same category or return to the full English Block Dictionary. - [Back to Sensing Blocks](/en/dictionary/sensing/): See the overview and patterns for Sensing Blocks. - [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/sensing/key-pressed/ [Scratch Daizen (English)](https://scratch.gmnavi.jp/en/)