KEY EVENT: The buttons on the keyboard are a great way to provide many input controls. Look in !

  • Add four My Key Press so that astronaut can be moved in all directions: up, down, left, and right.
  • Edit the events for your own controls. You can use the arrow keys, WASD keys, or other keys of your choice!
  • Move astronaut in each event with Move Up, Move Down, Move Left, and Move Right.
  • Make sure to include the correct key and event name as the parameters in each event handler.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)