1 of 29

Key Press

What is this?

Key Press is one of 10 modules in Getting Unstuck, a Scratch curriculum developed by the Creative Computing Lab. The aim of the curriculum is to foster classroom cultures that support creative and conceptual fluency with code.

Find more modules and the orientation to Getting Unstuck at gettingunstuck.gse.harvard.edu

2 of 29

Prompt Overview

Create a project where a user can control a sprite using the keyboard.

Whenever the user presses the up, down, left, or right arrow keys, the sprite moves in a certain direction.

What concept will we explore in this module?

In this module, students explore keyboard interactivity through both sensing and events.

3 of 29

What can students make with keyboard interactivity?

Controlling sprites via the keyboard can be useful for making games and interactive narratives. Key presses can allow users to program many types of actions!

For example, students might program their projects so that users can press keys to control sprites’ positions, colors, sizes, costumes, sounds, or other attributes.

The user can press the d key to switch the sprite’s costume.

What else should I know about keyboard interactivity?

There are many different interactive events that can be programmed using a keyboard! Since there are so many keys on a standard keyboard, you can encourage students to try out many different visual and sound effects.

This module can also be an opportunity for students to consider the difference between event-based interactivity (e.g., using an event block such as when key pressed) and sensing-based interactivity (e.g., sensing for key presses by using a key pressed? block).

A loop is necessary here to continuously check whether h is currently pressed. Otherwise, the if/then block would only check one time.

4 of 29

There are many different ways to go about creating this project.

Here are a few blocks that students will likely use:

Any key press can be an event. Blocks added to these code stacks will cause sprites to react when specific keys are pressed. Using the drop-down menu, students can designate which key the user must press in order to cause something to happen.

Students might also use a conditional (if/then or if/else) with a sensing block nested inside to detect when a key is pressed. Using these blocks, students can create different actions or changes for the sprite, depending on the key. Unlike event blocks, which are used to start a code stack, these blocks can be used anywhere within a code stack.

Additional resources

  • Use Arrow Keys: In the Scratch editor, click on Tutorials, then click on the Use Arrow Keys Scratch tutorial to explore how to move a sprite
  • Chase or Pong Games: Explore the Make a Chase Game (pp. 21–28) or Pong Game (pp. 29–32) educator guides to familiarize yourself with different projects students might want to make
  • Getting Unstuck 2020 Studio: Explore additional Key Press projects made by teachers

5 of 29

The activities in this module are designed to help students create Scratch projects that are unique and matter to them, while exploring a particular computer science concept. This work is supported through the essential design studio practices of exploring, creating, sharing, and reflecting.

create

explore

share

reflect

The Key Press module includes 18 activities. We recommend using the 6 activities below as the foundation for the learning experience and incorporating additional activities as desired. Based on teachers’ classroom use of the activities, we expect that this module will span five 45-minute sessions.

Activities Overview

Activity Type

Activity Name

Activity Description

Explore

Inspiration Studio

Inspire imagination with a curated collection of Scratch projects

Create

Project Prompt

Dive into the project prompt and experiment with blocks

Create

Unstuck Strategies

Try some strategies to get unstuck when challenges are encountered

Share

Heart and Star

Support progress and exploration through peer feedback

Reflect

Journal Entries

Engage reflection on progress each session through formative assessment

Reflect

Self Assessment

Honor growth and explore potential next steps through summative assessment

Along with the 6 foundational activities, we encourage you to include some of the 12 additional activities listed on the next page. These activities are intended to offer other ways of supporting your students’ (and your own!) creative and conceptual fluency. We hope that you remix and reimagine these activities, as well as include activities you are excited about from other sources—whatever works best for you and your students!

6 of 29

We have also created how-to Scratch logistics pages that may be helpful for students as they work through the module, including: how to share a project to a studio, how to fill in a Scratch project page, how to give credit, and how to give feedback.

Activity Type

Activity Name

Activity Description

Explore

Brainstorm Ideas

Connect to interests and experiences through an invitation to imagine

Explore

Read Me

Read a little bit of Scratch code featuring the key concept

Explore

Unplugged

Explore key concepts through teacher-led movement and play

Create

Make a Plan

Record ideas and intentions for projects using a planning template

Create

Storyboard

Document project dreams with visuals and text

Create

Remixable

Remix a project that was designed to be reimagined

Share

Red Yellow Green

Explore multiple perspectives with peer feedback

Share

Leave a Comment

Give and receive feedback via the Scratch website

Share

Gallery Walk

View and respond to others’ projects through a class tour

Reflect

Think, Pair, Share

Consider progress individually and share with others

Reflect

Notes and Credits

Document thinking with the Notes and Credits feature on the Scratch website

Reflect

Code Comments

Make thinking visible through code commenting

These activity pages are designed to be shared with students—to guide their work and to help them keep track of their learning. We call a student’s collection of activity pages their design journal. To help organize the activity pages in students’ design journals, we have included a cover page. This cover page offers an overview of the project prompt through text and video, as well as a list of key activities for quick reference. You will need to update the cover page to reflect the activities you choose to include.

7 of 29

How will you bring the Key Press module to life in your classroom? Here we offer some planning prompts and reflection questions to help you get ready to explore, create, share, and reflect with your students!

What else will help you prepare? What will help your students imagine and create their wonderful projects?

Teaching the Module

Explore

Share

Inspiration Studio

Heart and Star

Brainstorm Ideas

Red Yellow Green

Read Me

Leave a Comment

Unplugged

Gallery Walk

Create

Reflect

Project Prompt

Journal Entries

Unstuck Strategies

Self Assessment

Make a Plan

Think, Pair, Share

Storyboard

Notes and Credits

Remixable

Code Comments

  • Choose activities (from the foundational and additional activities summarized in the adjacent table, or from other sources) that you’ll use to teach this module.
  • Create a Scratch studio for students to share projects.
  • Set up students’ design journals by customizing the cover page and including relevant activities.
  • Create your own Key Press Scratch project to help familiarize yourself with the prompt.
  • Make plans for differentiation in order to support all of your students and their unique needs.
  • Identify any specific computer science standards or cross-curricular connections you would like to make.
  • Connect with other Getting Unstuck educators on Twitter or on Facebook.

8 of 29

What will you do? Which activities will you include?

How was it? What would you change?

Session 3

Session 4

Session 5

Session 1

Session 2

We’ve included this page to help you map out your chosen activities across different sessions and to document your thoughts about how sessions went. You may have more sessions; you may have fewer sessions—just add or remove rows as needed.

9 of 29

Create a project where a user can control a sprite �using the keyboard.

Key Press Design Journal

Name

Username

Click on the video �to learn more about this project!

What do you want to do?

10 of 29

  1. Open that project and click
  2. Find a when key pressed block or a key pressed block.

Why is this project interesting to you?

Exploring projects that other Scratchers have made can help us get inspired about what we want to make!

  1. Click on this link: scratch.mit.edu/studios/27320996
  2. Visit a few of the projects in the Key Press studio.�Choose a project that you think is interesting.

What key does the user press? What happens?

Inspiration Studio

Name

Username

Explore

11 of 29

Blocks to explore

Create a project where a user can control�a sprite using the keyboard.

Key Press

Name

Username

Create

Keep going

Stuck? Try using the strategies on the Unstuck Strategies page!

Done? Explore ideas for what you could do next: scratch.mit.edu/projects/541477729

Get started

  • Sign into Scratch.
  • Click to start a project.
  • Share your project in the class studio. (Need help?)
  • Start working on your project!

Studio link

Project link

Finish up

  • In your project’s Instructions, explain how others should use your project. (Need help?)
  • In your project’s Notes and Credits, explain how you made your project. (Need help?)

12 of 29

Unstuck Strategies

Name

Username

Create

Search online

See if someone else has an answer! On Scratch, search for [thing you want] + “tutorial.”

For example, you could search for “score tutorial,” or “animation tutorial.”

Be inspired by others

Go to your class studio to see others’ projects. Find a project and click See Inside.

What do you notice? What is something you could try in your own project?

I don’t know how to...

  1. I need to...
  2. Then I want to...
  3. Another thing is...

Break it down

Breaking down a problem into smaller parts can help us figure things out.

Write out the problem. Then, write or draw three smaller parts of the problem.

Which strategies did you try for this project? Which strategies worked for you?

Getting stuck is part of the process when working on projects! Here are some strategies to help.

13 of 29

  1. Show your project to a classmate.
  1. Switch!
  1. Ask them to say one thing you could try in your project.

⭐️

What if you...

⭐️

Something you could do next is...

⭐️

You could try...

Heart and Star

Name

Username

Share

Sharing your project with classmates can help you get feedback about what to work on next.

❤️

My favorite part was...

❤️

I like the way you… because...

❤️

You should continue to...

  1. Ask them to say one thing they like about your project.

14 of 29

Use the boxes below to write or draw your thinking, or share a link to a video or audio reflection.�Try using these sentence starters to help you share your ideas!

Date

Student reflection

Teacher response

Today I learned...

I need help with...

I wonder how I could...

Today I was proud of...

Journal Entries

Name

Username

Reflect

15 of 29

Teacher response:

Write in each box: what is something you are proud of?

Expectations

Write in each box: what is something else you could try?

Personalization: I customized my project with sprites, sounds, and/or backdrops to make it look the way I want.

Prompt: In my Key Press project, a user can control a sprite using the keyboard.

Community: I helped someone with their project and got help from someone else.

Effort: I persevered through challenges and tried different strategies to solve problems.

What inspired you to make your project?

What else should your teacher know?

Self Assessment

Name

Username

Reflect

16 of 29

Let’s brainstorm ideas for what project you could make. Start by thinking about what happened yesterday.

What did you do? What did you see or hear? What did you notice?

Brainstorm Ideas

Name

Username

Explore

Write down three things you did yesterday.

Draw yourself doing something you love.

Draw something you saw yesterday.

Write down one idea for your Scratch project.

Tell a classmate about your idea!

17 of 29

Read the code for this Key Press project. What happens in this project?

Read Me

Name

Username

Explore

18 of 29

In this teacher-facilitated unplugged activity, students will act out certain commands when you say that different keys are being pressed. This activity helps students explore another method for adding interactivity to their projects.

Preparation

  • Print the code excerpts on the next page, then cut along the lines. Each student will receive one quarter of the page.

Activity

  • Give a code excerpt to each student.
  • Tell the students that they should only execute code blocks if they hear their key called out.
  • Say each of the four keys (“Space! Up arrow! M! V!”), giving time for students to act out their parts.
  • Optionally perform a few rounds.

Discussion

  • What happened? Why did some students do things while others did not?
  • In Key Press projects, we will make things happen when different keys are pressed in our projects. What are some things that could happen in Scratch projects when the user presses keys?
  • What kinds of projects could you make that use key press?

Unplugged

Explore

19 of 29

If you hear that your key has been pressed, execute the instructions!

If you hear that your key has been pressed, execute the instructions!

If you hear that your key has been pressed, execute the instructions!

If you hear that your key has been pressed, execute the instructions!

20 of 29

Write or draw your ideas to share what you’re currently thinking about for your Key Press project!

What is your project about?

What will happen in your project?

Which key(s) will the user press to control a sprite?

What will happen when the user presses the keys?

Make a Plan

Name

Username

Create

21 of 29

What happens in your project? Draw the important events and write about them underneath.

Storyboard

Name

Username

Create

Now that you’ve made a storyboard, what are you going to work on next in your Scratch project?

22 of 29

Remixable

Name

Username

Create

  1. Go to the Remixable for Key Press at scratch.mit.edu/projects/541497898
  2. Read the instructions and notes.
  3. Try out the project! What do you notice?
  4. Click to explore the code.
  5. Click to create a remix.

What are 3 things you could change in this project to make it your own?

23 of 29

Find three peers to give you feedback on your project. Read their feedback and decide what to do next.

For peers: Write your name and red, yellow, and green suggestions in the table.

Peer Name

RED

Something I’d change

YELLOW

Something I wondered

GREEN

Something I liked

Red Yellow Green

Name

Username

Share

For you: Based on this feedback, one thing I’m going to work on next is…

24 of 29

Leave a Comment

Name

Username

Share

Feedback from others can help you decide what to work on next. One way that we can share feedback is by leaving comments on Scratch projects!

  1. Log onto Scratch, and find your class studio.
  2. Click on a project that you want to explore.
  3. After you’ve tried it out, scroll down to the Comments section.
  4. Write a constructive comment for the project creator to help them work on their Scratch project.
  5. Click the button.
  6. Go back to the class studio to view another project. Try to find projects that have no comments to help everyone get feedback!

25 of 29

For the feedback giver

  • Share something you like about their project.
  • Share something they could try in their project.
  • Switch! Show your project and get feedback!

For the project sharer

  • Show your project to your classmate.
  • Share something you like about your project.
  • Share a question you have about your project.

When both of you have shared your projects, find a new partner. Show your project and give feedback to at least three other people!

❤️

Something I like about my project is...

Something I wonder is...

❤️

My favorite part of your project was...

⭐️

Something you could try is...

Gallery Walk

Name

Username

Share

⭐️

Something I’m excited about...

Could you tell me more about...

26 of 29

Pair: With a partner, take turns sharing your responses to the questions above. After you listen to your partner, ask them one question about their project.

What is something going well in your project?

What is something that you are working on?

What do you want to work on next?

Share: What is one thing you want to share with the whole class?

Think, Pair, Share

Name

Username

Reflect

Think: By yourself, think about the questions below. You can write or draw in the boxes.

27 of 29

My project is about… because...

Today I worked on...

Something new I tried was...

I was inspired by...

Next I want to make...

  • Log onto Scratch, and find your project.
  • Go to the Notes and Credits section of your project.
  • Using the sentence starters below, write 1–2 sentences about what you did today.
  • When you’re done, go to your class studio and read what others have written about their projects!

Writing in the Notes and Credits helps others learn about your ideas and how you created your project.

Notes and Credits

Name

Username

Reflect

28 of 29

First, right-click on a code stack in your project.�Then, click on Add Comment.

Once the sticky note pops up, write a 1–2 sentence comment on the sticky note.

Try using these sentence starters to write a comment that explains your thinking.

When you’re done, go to your class studio and read what others have written about their projects!

Writing comments about specific code stacks can help others learn about how your code works.

This code stack resets...

I added this code so that...

I used these blocks to...

This code stack makes...

Code Comments

Name

Username

Reflect

29 of 29

This curriculum has been released under a Creative Commons Attribution-ShareAlike 4.0 license, which means that you are free to use, change, and share the curriculum, as long as you provide appropriate attribution and give others access to any derivative works.

Getting Unstuck was made possible with support from the National Science Foundation through grant #1908110. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.