Home · Academy · Code and Build · Creative Coding and Game Design · Interaction with Keyboard, Mouse and Sensors

Interaction with Keyboard, Mouse and Sensors

Interactive systems map keyboard, pointer or sensor input to state changes, feedback and accessible alternatives.

LESSON COMPASS

What will you use this page for?

Core idea

Interactive systems map keyboard, pointer or sensor input to state changes, feedback and accessible alternatives. The lesson connects four ideas—input event, coordinate mapping, state update, and alternative controls—to one practical situation. Rather than treating these ideas as isolated definitions, the page shows how they work together. You first…

Evidence to produce

Complete the page task with your own input, test conditions and reasoning.

Control trap

Using input event as a label without showing how it changed the decision. Choosing one example for coordinate mapping and treating it as a universal rule. Recording only the final answer and losing the evidence created through state update. Ignoring the limits or recovery steps connected with alternative controls. For…

Next connection

Return to the module page, complete the evidence artefact for this lesson and continue to the next item in sequence. A project should be presented as completed personal work…

Module sources: Scratch Educators · p5.js Tutorials

LevelBeginner–Intermediate
Age10–15
Duration55–85 min
PrerequisitePrevious item in this module
ContentStandard lesson · 2435 words
Last updated

Short answer

Interactive systems map keyboard, pointer or sensor input to state changes, feedback and accessible alternatives. The lesson connects four ideas—input event, coordinate mapping, state update, and alternative controls—to one practical situation. Rather than treating these ideas as isolated definitions, the page shows how they work together. You state the problem first, then choose the evidence, take a safe action and record what changed. This structure is useful beyond this topic because it makes reasoning transferable: the next unfamiliar tool or claim can be approached with the same disciplined sequence.

Why this matters

Interactive systems map keyboard, pointer or sensor input to state changes, feedback and accessible alternatives. This matters because a learner can follow a rule once without understanding when it applies, when it fails or how to recover from a mistake. Treat the first answer as a hypothesis to test, not a conclusion to defend. In the creative coding context, the goal is not merely to remember vocabulary. The goal is to make a decision that another person can inspect, question and improve. A creative system becomes teachable when its visual or playful effect can be traced to explicit rules, inputs, states, feedback and testable design decisions. Good work keeps both the result and the route to the result visible. Therefore every activity on this page asks for an artefact: a table, diagram, test record, checklist, explanation or short reflection.

Learning objectives

  • Explain input event and connect it to the main decision in the lesson.
  • Use coordinate mapping to compare at least two possible actions.
  • Create visible evidence by applying state update.
  • Recognise the limits, risks or assumptions connected with alternative controls.

Four working principles

input event is one of the central decision points in Interaction with Keyboard, Mouse and Sensors. Creative coding combines expression with structure: you invent an experience, then makes its rules visible enough to test, revise and share. Applied to the worked situation, this principle helps you decide what to inspect, which evidence to record and where to draw the line. It also prevents the topic from becoming a list of rules with no reason behind them. You should be able to explain the principle in your own words, identify it in a new example and show one piece of evidence that the principle was actually used. In the case used on this page—a drawing program responds to mouse movement but becomes unusable with a keyboard or noisy sensor values.—the principle changes the next action: instead of reacting immediately, you pause, work out which information matters and choose a step you can check. A useful record includes the starting condition, the decision, the result and one limitation. That record becomes a learning artefact rather than a private impression.

The first useful lens is coordinate mapping . Creative coding combines expression with structure: you invent an experience, then makes its rules visible enough to test, revise and share. Applied to the worked situation, this principle helps you decide what to inspect, which evidence to record and where to draw the line. It also prevents the topic from becoming a list of rules with no reason behind them. You should be able to explain the principle in your own words, identify it in a new example and show one piece of evidence that the principle was actually used. In the case used on this page—a drawing program responds to mouse movement but becomes unusable with a keyboard or noisy sensor values.—the principle changes the next action: instead of reacting immediately, you pause, work out which information matters and choose a step you can check. A useful record includes the starting condition, the decision, the result and one limitation. That record becomes a learning artefact rather than a private impression.

In this lesson, state update turns a broad idea into something observable. Creative coding combines expression with structure: you invent an experience, then makes its rules visible enough to test, revise and share. Applied to the worked situation, this principle helps you decide what to inspect, which evidence to record and where to draw the line. It also prevents the topic from becoming a list of rules with no reason behind them. You should be able to explain the principle in your own words, identify it in a new example and show one piece of evidence that the principle was actually used. In the case used on this page—a drawing program responds to mouse movement but becomes unusable with a keyboard or noisy sensor values.—the principle changes the next action: instead of reacting immediately, you pause, work out which information matters and choose a step you can check. A useful record includes the starting condition, the decision, the result and one limitation. That record becomes a learning artefact rather than a private impression.

A reliable approach begins by making alternative controls explicit. Creative coding combines expression with structure: you invent an experience, then makes its rules visible enough to test, revise and share. Applied to the worked situation, this principle helps you decide what to inspect, which evidence to record and where to draw the line. It also prevents the topic from becoming a list of rules with no reason behind them. You should be able to explain the principle in your own words, identify it in a new example and show one piece of evidence that the principle was actually used. In the case used on this page—a drawing program responds to mouse movement but becomes unusable with a keyboard or noisy sensor values.—the principle changes the next action: instead of reacting immediately, you pause, work out which information matters and choose a step you can check. A useful record includes the starting condition, the decision, the result and one limitation. That record becomes a learning artefact rather than a private impression.

Worked case

Situation: A drawing program responds to mouse movement but becomes unusable with a keyboard or noisy sensor values.

The weak response would be to choose the fastest or most familiar action without checking assumptions. The stronger response begins by writing one sentence that defines the problem, one sentence that states what evidence would change the decision and one sentence that names a safety or privacy boundary. You then applies input event before using coordinate mapping. After the action, state update is used to create a record, while alternative controls is used to review limitations.

A good case analysis does not pretend that every uncertainty disappears. It distinguishes a confirmed observation from an interpretation and a future question. That distinction is especially important for learners aged 10–15, because many digital, research and robotics situations look more certain on a screen than they really are.

A practical workflow

  1. Write the exact goal in one sentence and remove words such as “best” or “safe” unless they are defined.
  2. List what can be observed about input event and what is still an assumption.
  3. Choose one comparison or check based on coordinate mapping.
  4. Perform the smallest safe action that produces evidence for state update.
  5. Review the result through alternative controls and record at least one limitation.
  6. Explain the final decision to another learner without hiding the evidence trail.

Practice lab

Practical task: build an interaction map, add filtering and create at least two ways to perform the main action.

For Interaction with Keyboard, Mouse and Sensors, use a four-column page labelled starting condition, decision, evidence and next revision. The first column captures the situation before any change. The second states what you chose and why. The third contains an observable artefact rather than a claim such as “it worked”. The final column records what you would change if the same task were repeated.

Complete the activity once, then exchange the record with a classmate or trusted adult. Ask them to identify which conclusion is strongly supported, which conclusion is only plausible and which detail is missing. Revise the record without adding private information or pretending that an untested step was completed.

Evidence and evaluation

Evidence and evaluation table
Evidence itemWhat it should showQuality question
DefinitionThe goal and the meaning of input eventCould another learner identify the same boundary?
ComparisonAt least two options considered through coordinate mappingWere the options compared under fair conditions?
Test recordAn observable result connected with state updateAre units, dates or conditions visible where relevant?
ReflectionA limitation or next step identified through alternative controlsDoes the reflection change a future action?

Evidence should be sufficient for the learning purpose but should not expose passwords, personal messages, precise locations, private photographs or information about another person. When the topic involves measurements, keep raw values as well as the final chart or average. When it involves research, keep the source path as well as the conclusion.

Common mistakes

  • Using input event as a label without showing how it changed the decision.
  • Choosing one example for coordinate mapping and treating it as a universal rule.
  • Recording only the final answer and losing the evidence created through state update.
  • Ignoring the limits or recovery steps connected with alternative controls.

A useful correction is to return to the original goal, reduce the task and run one check that can disprove the current assumption.

Safety, privacy and limits

Creative coding combines expression with structure: you invent an experience, then makes its rules visible enough to test, revise and share. Use fictional or privacy-safe examples whenever real accounts, messages, images, locations or personal learning records could identify someone. Do not test security ideas on systems you do not own or have explicit permission to use. Do not present a proposed project as Doruk’s completed personal work until real evidence and publication approval exist.

For mathematics and measurement tasks, use low-risk educational equipment and state units clearly. For research tasks, respect copyright and attribution. For study-system tasks, avoid turning a dashboard into surveillance: the purpose is reflection, not pressure or comparison with other children.

Lesson summary

Interaction with Keyboard, Mouse and Sensors can be summarised as a sequence: define the situation, apply input event, compare through coordinate mapping, create evidence with state update, and review the result using alternative controls. The sequence is more important than a memorised slogan because it can be used again in an unfamiliar case.

The final learning goal is independence with boundaries. A learner should know what can be checked alone, what requires permission or adult support, and what must remain private. The work is complete only when the reasoning and evidence are clear enough to revisit later.

Review questions

  1. What role does “input event” play in Interaction with Keyboard, Mouse and Sensors?
  2. What role does “coordinate mapping” play in Interaction with Keyboard, Mouse and Sensors?
  3. What role does “state update” play in Interaction with Keyboard, Mouse and Sensors?
  4. What role does “alternative controls” play in Interaction with Keyboard, Mouse and Sensors?
  5. In Interaction with Keyboard, Mouse and Sensors, why is an evidence trail stronger than a confident conclusion?
  6. In Interaction with Keyboard, Mouse and Sensors, what should happen when a result is uncertain?

Answers with explanations

  1. What role does “input event” play in Interaction with Keyboard, Mouse and Sensors?

    In Interaction with Keyboard, Mouse and Sensors, “input event” gives you a specific lens for deciding what to inspect, compare or record. In the worked case it should change an observable action, not remain a vocabulary label.

  2. What role does “coordinate mapping” play in Interaction with Keyboard, Mouse and Sensors?

    In Interaction with Keyboard, Mouse and Sensors, “coordinate mapping” gives you a specific lens for deciding what to inspect, compare or record. In the worked case it should change an observable action, not remain a vocabulary label.

  3. What role does “state update” play in Interaction with Keyboard, Mouse and Sensors?

    In Interaction with Keyboard, Mouse and Sensors, “state update” gives you a specific lens for deciding what to inspect, compare or record. In the worked case it should change an observable action, not remain a vocabulary label.

  4. What role does “alternative controls” play in Interaction with Keyboard, Mouse and Sensors?

    In Interaction with Keyboard, Mouse and Sensors, “alternative controls” gives you a specific lens for deciding what to inspect, compare or record. In the worked case it should change an observable action, not remain a vocabulary label.

  5. In Interaction with Keyboard, Mouse and Sensors, why is an evidence trail stronger than a confident conclusion?

    Because another person can inspect the observations, conditions and reasoning, identify a limitation and repeat or improve the work.

  6. In Interaction with Keyboard, Mouse and Sensors, what should happen when a result is uncertain?

    The uncertainty should be labelled, the missing evidence should be named and the next safe check should be planned instead of presenting the result as proven.

Sources and verification note

The official or primary references listed below provide the technical and educational foundation for “Interaction with Keyboard, Mouse and Sensors”. These links support the concepts; they do not prove that a proposed project has been physically completed. Dates, software behaviour and policy details should be rechecked before future publication updates.

  • p5.js — Keyboard Events
  • p5.js — Mouse Events
  • micro:bit — Sensors
  • W3C WAI — Understanding Keyboard

Next step

Return to the module page, complete the evidence artefact for this lesson and continue to the next item in sequence. A project should be presented as completed personal work only after real testing evidence and publication approval exist.

SHORT PRACTICE

Check your understanding

Think of your own answer first, then compare it with the example answer. This section is not graded and does not save results.