User Input and Interaction

User Input

User input for programs can come in many forms. Most often, a user interacts with a program by clicking or moving a mouse, or through typing via a keyboard. In this way, a user can direct a program to behave in a certain way without predetermining the data when programming. In the following activity, you will program Scratch the Cat to react to user input.

In order to do that, we will use the when event blocks located in the “Control” tab.

The event trigger can be changed using the drop down menu. Create 4 separate event blocks corresponding to each of the arrow keys.

Moving with the Arrow Keys

Now that our program is anticipating four different key presses as possible inputs, let’s instruct Scratch to react to these inputs. We can use the block point in direction [...] located in the Motion tab as shown below:


Your job is to create a program with a sprite that moves related to user input, including arrow keys and at least two other inputs.

Program an original program in Scratch that meets the following minimum requirements for your Scratch program:

  1. Create a new Scratch program with at least one sprite.
  2. Create four separate event blocks corresponding to each of the arrow keys.
  3. Add the appropriate point in direction [...] block to each event block you created above. NOTE: The Cat should react to each key press by facing the proper direction.
  4. Attach a move [10] steps block to each of your events. Note: The Cat should move around based upon the arrow keys pressed.
  5. Add two other event blocks that react to different user input (e.g., key presses, mouse movement/clicks)
  6. Personalize it in at least three other ways.
  7. Provide documentation for your program (describe what it does) as the Instructions. Be sure to describe how your program is original.

When you are satisfied with your work, submit a link to your program or the program itself.