Detecting Key Presses
Use the “key (space) pressed?” sensing block inside an if block to react when the player presses a key.
Building a Keyboard-Controlled Sprite
- When 🏁 clicked → forever
- if then → change x by (5)
- if then → change x by (-5)
- if then → change y by (5)
- if then → change y by (-5)
Now your sprite is fully controllable with arrow keys!