Keyboard Builder: The Key Nobody Pressed
Students open a 61-key keyboard and see its wiring: 5 rows and 14 columns, 19 pins where one wire per key would need 61. They hold Q, W and A and the board sees four keys: S lights up, and nobody pressed it. They fix it with a diode at every switch, then try the cheaper fix, a controller that blocks the doubt, and watch it throw a real key away.
At a glance
Essential question
How does a keyboard with 61 keys tell which ones are down using only 19 wires?
Objectives
Students will be able to:
- explain that a keyboard finds a key by scanning rows and columns, not by a wire for every key
- make a ghost key appear and say which three keys caused it and why
- fix the ghost with diodes and test the fix with the same three keys
- compare two fixes, diodes and blocking, by what each one costs
Vocabulary
Matrix, Controller, Scan, Ghost key, Diode
Standards
2-CS-03, 3A-CS-01, HS-SYS-HW-30
Time and materials
45 minutes, grades 7-10.
- One computer or Chromebook per student
- A projector
- The worksheet and exit ticket, one copy each per student
- The rubric, one copy per student if you grade the work
Prep
Make copies of the worksheet and exit ticket. Before class, open mytekdev.com/try/keyboardbuilder?lesson=the-key-nobody-pressed&ref=tpt-keyboardbuilder-1 once on a student computer: it opens with the order A letter nobody pressed in hand, and checks that your school's filter allows the app. Run it yourself, about ten minutes: open the Matrix bench, click Q, W and A (the board sees 4 keys), turn Diodes on (3 keys, order closed), then take the order It says anti-ghosting on the box and, with the same three keys still held, turn Diodes off and click Block the doubt (the board reports 2).
Assessment
- Formative: the questions under What to look for, asked while students work, and the exit ticket (answer key included).
- Summative: the worksheet, scored with the rubric.
Technology and privacy
Runs in any browser, Chromebooks included, with nothing to install. Students need no account and no email: the link works signed out, and nothing they do is stored on our server unless they choose to save. Every key on the drawn keyboard can be clicked, so no lesson needs a key a Chromebook does not have. Key sounds start off, and you can lock them off under Setup.
mytekdev.com/try/keyboardbuilder?lesson=the-key-nobody-pressed&ref=tpt-keyboardbuilder-1mytekdev.com/tools/keyboard-builder/lessons/the-key-nobody-pressed/startEach student gets their own copy, and the same link reopens it next time. How to set up a classLesson sequence
| Minutes | Stage | What you do | What students do |
|---|---|---|---|
| 0 to 5 | Warm-up Hook | Show the title, essential question and Today I can slides (about 1 minute). Then the warm-up: how many wires for 61 keys? Write every guess on the board. | Answer the warm-up on the worksheet. |
| 5 to 12 | Direct instruction (I do) Model it | Project the app with the starter open and open the Matrix bench. Point at the gold wires and count them: 5 rows, 14 columns. Click one key and read the line under the board. Press Step one column a few times so students see the scan move. Then say: watch what happens with three. It's working when: The controller cannot see keys. It powers one column and checks which rows answer. A pressed key is a closed gate between its row and its column. | Watch, and fill in the vocabulary on the worksheet. |
| 12 to 24 | Guided practice (We do) Catch the ghost, fix it | Students open the link or scan the QR code. A short guide walks them through Q, W and A, the diodes, and the anti-ghosting order. After the ghost appears, ask: which key did nobody press? Watch for: Students who type on their own keyboard and see no ghost. On the Matrix bench a click on the drawn board holds a key down; their real keyboard will not show a ghost, and the last part of the lesson says why. | Follow the guide. Fill in the first three rows of the table. |
| 24 to 38 | Independent practice (You do) Other threes | With the diodes off and the controller set to Report everything, students press Let go of every key, then test A, S and W, then Q, W and E, and one set of their own, letting go between tests and recording what the board sees. Walk the room with the What to look for questions. If they ask: "Q, W and E gave no ghost. What is different about where those three keys sit?" Q, W and E | Finish the table and answer the questions. |
| 38 to 45 | Closure Showcase and exit ticket | Show the Showcase slide. Two students explain what "anti-ghosting" meant on the board that blocked the doubt, then go back to the warm-up guesses. Hand out the exit ticket. | Answer the exit ticket. |
Before you teach: a ten-minute walkthrough
Open mytekdev.com/try/keyboardbuilder?lesson=the-key-nobody-pressed&ref=tpt-keyboardbuilder-1. A short guide opens over the app. The keyboard is a 60 percent board, 61 keys, and an order from a customer is on the right. Open the Matrix bench: the caps turn see-through and the gold lines under them are the row and column wires.
- The ghost. Click Q, W and A on the board. Each click holds a key down. S lights up pink, and the line under the board reads "The board sees 4 keys. You are holding 3. The pink one is a ghost."
- The fix. Under Diodes, click On. The line reads "You are holding 3 keys. The board sees 3." and the order closes with "Three keys held, three keys read."
- The cheaper fix. Take the order It says anti-ghosting on the box. The three keys are still held. Click Off under Diodes, then Block the doubt. The line reads "You are holding 3 keys. The board reports 2. It dropped A because it could not be sure." Three answers appear on the right; the one that closes the order is "No made-up key, but a real key can go missing".
- Other threes. Set the controller back to Report everything, and press Let go of every key before each test: a click on a held key lets it go. A, S and W give a ghost at Q. J, K and I give a ghost at O. Q, W and E, all in one row, give no ghost.
Background for the teacher
A wire for every key would take 61 pins on the controller, and the one in the app has 26. So the keys are wired as a grid. Each switch joins one row wire to one column wire. The controller powers one column at a time and reads the rows, about 1,800 times a second in the app, and works out which crossings are closed.
The trouble comes when three held keys sit on three corners of a rectangle: two rows and two columns. Current can run from the powered column through one switch, along a row, backward through a second switch, and through the third to the row of the fourth corner. The controller reads that row as joined to that column, and reports a key nobody pressed. A diode beside each switch lets current go one way only, which breaks the backward step. The other fix costs nothing: when a new key could be a ghost, the controller ignores it until another key is let go. Engineers call that blocking or jamming.
The keyboard in the app is a model. Its grid is the textbook one, with every key on its own row and column crossing; a real board often folds the grid to save pins. A real keyboard you can buy today almost never shows a ghost key: it either has a diode at every switch or it drops the key it cannot be sure of. On the Matrix bench, the panel named The keyboard in front of you counts the keys a student's real keyboard is reporting: on many laptops the count stops at 2 for some sets of three keys.
What to look for
Ask these while students work. A student who has understood the lesson can answer them without help:
- How many wires does this keyboard use, and how many would one wire per key take?
- Which key lit up that you did not press? Where does it sit compared with the three you held?
- Why did Q, W and E give no ghost?
- What did the diodes change? What did they cost?
- With the board blocking the doubt, which key went missing? Was it a key you were holding?
Cross-curricular extensions
- Math: a grid of 5 rows and 14 columns has room for 70 keys on 19 wires. How many keys could 6 rows and 21 columns hold, and on how many wires?
- Science: a diode is a one-way gate for electric current. Find one on a circuit diagram and say which way the current may go.
- English: write the two sentences a keyboard box should print in place of "anti-ghosting", so a buyer knows what the board really does.
- At home: on the Matrix bench, click the board and hold Q, W and A on a real keyboard. Does the count reach 3? Try other threes.
Vocabulary
| Matrix | A grid of row wires and column wires. Each key joins one row to one column when it is pressed. |
| Controller | The small chip in the keyboard that checks the wires and tells the computer which keys are down. |
| Scan | Checking one column at a time, over and over, to see which rows it is joined to. |
| Ghost key | A key the board reports that nobody pressed. |
| Diode | A part that lets electric current go one way only. |
Differentiation
English learners
- Keep the vocabulary slide up, and point at the screen as you say each word: the lit keys, the gold wires and the line under the board carry the meaning.
- Pair each learner with a partner; a lit key and a pink key are pictures, and the counts are numbers.
- Accept the table as numbers and key names copied from the screen.
Students with IEPs or 504 plans
- Pair students for the independent part, one at the app and one filling in the table.
- Zoom the browser to 125%; the board and the line under it stay readable.
- Allow two sets of three keys instead of four, where the IEP allows a modified assignment.
Students who need more support
- A sentence starter: "S lit up because Q, W and A sit on ___ rows and ___ columns."
- A check-in after the guide: every student has the 4, the 3 and the 2 in the table before anyone moves on.
- Have students trace the two rows and two columns on the screen with a finger before they answer.
Students ready for more
- Find a rule: which sets of three keys make a ghost, and where does the ghost appear? Test the rule on three keys you have not tried.
- Click One wire per key under Wiring. How many pins does it take, and how many does this controller have?
- Change the size to Full size on the Build bench and come back. How many rows, columns and pins now? What does the card say about the controller?
Adapting for other grades
Younger students: In grades 5 and 6, leave the level on Middle school and do the guide together on the projector, with pairs sharing a computer, one clicking and one recording. Skip the third rubric row; total 8, and 6 meets the objectives. Use the words gate and wire in place of switch and matrix until students have seen the ghost.
Older students: In grades 11 and 12, set the level to High school. Have students draw the four switches Q, W, A and S as a square on two rows and two columns and trace the path the current takes around three closed switches to the fourth. Then ask where one diode would have to go to break that path, and why the board needs one at every switch.
Keyboard Builder: The Key Nobody Pressed
Student worksheet
Name: ______________________________ Date: ______________
Open the app: scan the QR code, or go to mytekdev.com/try/keyboardbuilder?lesson=the-key-nobody-pressed
Essential question: How does a keyboard with 61 keys tell which ones are down using only 19 wires?
Warm-up: A keyboard has 61 keys. How many wires do you think it needs? ________
- Vocabulary. Matrix, controller, scan, ghost key, diode: write each in your own words.
- Count. Rows ________ Columns ________ Pins ________ Pins with one wire per key ________
- The test table. For each test write the three keys you held, the diodes (on or off), what the controller does, and what the board saw. Start with Q, W, A three ways: no diodes, diodes on, and blocking the doubt. Then A, S, W and Q, W, E with no diodes, and one set of your own.
1. Why did S light up when you held Q, W and A? Use the words row and column.
2. Diodes or blocking: which fix would you choose for a keyboard used for games, and what does it cost?
Keyboard Builder: The Key Nobody Pressed
Exit ticket
Name: ______________________________
1. A keyboard matrix finds a pressed key by (A) a separate wire for every key (B) checking which row and column are joined (C) reading the letter printed on the cap
2. With no diodes, Q, W and A held made S appear because (A) S is a worn-out key (B) the four keys share two rows and two columns (C) the board scans too slowly
3. A box says "anti-ghosting". Name one thing that keyboard might do when three keys are held.
Answer key: exit ticket
| Question | Answer | Why |
|---|---|---|
| 1 | B | Each switch joins one row to one column, and the controller scans for the crossings that are closed. |
| 2 | B | Three closed switches on three corners of a rectangle give the current a way around to the fourth corner. |
| 3 | Drop one of the keys | It can ignore a key it cannot be sure of, so no ghost shows but a real key goes missing. "Read all three, because it has diodes" is also right. |
Rubric
Score each row from 1 to 4.
Name: ______________________________
| Criteria | 4 Exceeds | 3 Meets | 2 Approaching | 1 Beginning |
|---|---|---|---|---|
| The test table | All four sets of three keys, each with the keys held and what the board saw. | At least three sets recorded. | One or two sets recorded. | No sets recorded. |
| Explaining the ghost | Says the three keys share two rows and two columns, so current finds a way around to the fourth corner, and names the ghost. | Says the keys share rows and columns and that this fools the board. | Says a key lit that was not pressed, with no reason. | No answer. |
| Comparing the fixes | Says diodes read every key and cost a part per key, and that blocking costs nothing and drops a real key. | Describes what both fixes did on screen. | Describes one fix. | No answer. |
Total: ____ / 12. A score of 9 or more meets the objectives.
Standards
Computing systems standards from both CSTA sets: 2017, which many state standards are still based on, and the 2026 standards that replace them. Students find a fault in a simulated device, trace it to how the device is built, fix it and test the fix.
| Framework | Code | Grades | Standard | How the lesson meets it |
|---|---|---|---|---|
| CSTA 2017 | 2-CS-03 | 6-8 | Systematically identify and fix problems with computing devices and their components. | Students make the fault happen on purpose with three keys, find its cause in the wiring, fix it with diodes, and test the fix with the same three keys. |
| CSTA 2017 | 3A-CS-01 | 9-10 | Explain how abstractions hide the underlying implementation details of computing systems embedded in everyday objects. | Students look under "press a key, get a letter" and explain the rows, columns and scanning that the keyboard hides from its user. |
| CSTA 2026 | HS-SYS-HW-30 | 9-12 | Demonstrate the capabilities and limitations of a physical or simulated computing device to address a task or problem. | Students show a limit of a simulated keyboard, three keys read as four or as two, and what each fix can and cannot do. |
Checked November 2026 against: CSTA 2017 K-12 standards progression chart, CSTA 2026 high school foundational standards.
Optional: save student work in a free class
The whole lesson runs at the link on the worksheet, with no accounts and no sign-up.
To keep students' work, and see it all in one place, make a free class. It takes about ten minutes, once, and covers every lesson in this series: mytekdev.com/tools/class-setup
Students in a class open mytekdev.com/tools/keyboard-builder/lessons/the-key-nobody-pressed/start instead of the worksheet link. Each one gets their own copy of the starter, and the same link reopens it next time.