🐱 Scratch for Kids · Lesson 3 of 7
Keyboard controls
Move a sprite with the arrow keys.
The basket
For our game we need a basket that the player moves. Hover over the sprite button (cat face, bottom right), choose “Choose a Sprite” and search “Bowl” or “Basket”. Drag it to the bottom of the stage. You can delete the cat or keep it.
Arrow keys
- Events: “when right arrow key pressed” → Motion: “change x by 10”
- Events: “when left arrow key pressed” → “change x by -10”
- Try it: the basket moves left and right
x and y
The stage is a grid. x is left–right (−240 to 240), y is up–down (−180 to 180). The center is x: 0, y: 0. “change x by 10” moves right; “change x by -10” moves left.
Smoother movement
The “when key pressed” blocks stutter. Smoother: “when green flag clicked” → “forever” → “if key right arrow pressed? then change x by 10” and the same for left (Sensing + Control blocks).
Tip
💡 Start the game in the same place every time: “go to x: 0 y: -140” right after the green flag.
✏️ Practice: your turn
- Add a basket sprite at the bottom of the stage
- Make it move with the arrow keys
- Make the movement smooth with forever + if
- Make it start at x: 0, y: −140
🧠 Quick quiz
Answer all 4 questions correctly to mark this lesson as done.
0 of 4 correct
All lessons in Scratch for Kids
- 🚩 1. Getting started: sprite, stage and green flagOpen a project and make the cat move and talk
- 🔁 2. Loops: doing things again“repeat” and “forever” — the cat bounces between the walls
- ⌨️ 3. Keyboard controlsMove a sprite with the arrow keys
- 🎵 4. Costumes, backdrops and soundsSimple animation, a stage backdrop and a sound for each action
- 🍎 5. Conditions: “if… then”The apple falls, and if it touches the basket, something happens
- 🔢 6. Variables: score and timeCount apples, and a 30-second timer
- 🏆 7. A complete game, and sharing itFinish up, add a level and share with friends