Please enable JavaScript to use CodeHS

Introduction to Computer Science in JavaScript (Golden) (2022)

Lesson 9.8 Key Events

Description

In this lesson, students will learn how to use keyboard keys to control events. Keyboard events capture when the user presses keys on the keyboard. This allows students to write programs that take input from the keyboard to change what is happening in the program.


Objective

Students will be able to:

  • Explain how events are different from timers.
  • Create interactive programs that use events to respond to the keyboard input.

Activities

These are all the activities included in the lesson

9.8.1 Key Events
9.8.2 Key Events Quiz
9.8.3 Keyboard Square
9.8.4 Basic Snake