Keyboard

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Keyboard

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. What happens inside a keyboard when you press a key?
A The key press shines a laser at the desk
B The key press completes a circuit
2. Which part of the keyboard works out which key was pressed?
A The keyboard controller
B The speaker
3. What does the keyboard send to the computer after a key is pressed?
A The character code for that key
B A picture of the key
4. A keyboard is which type of device?
A Output device
B Input device
5. Which is a use of a keyboard?
A Typing text and commands
B Scanning a 3D object to make a model

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1keyboard AThe number the keyboard sends to the computer to show which key was pressed
2character code BPressing a key closes (completes) the circuit, not opens it. The completed circuit is what lets the keyboard detect the key press.
3Pressing a key closes a circuit, so the keyboard controller can identify which key was pressed Ckey press -> circuit closed -> controller identifies key
4A keyboard is used to enter text and commands by sending a key's character code to the computer DAn input device where pressing a key completes a circuit and sends that key's character code to the computer
5Pressing a key opens the circuit, so the keyboard sends the code Epress 'A' -> code sent -> 'A' appears on screen
6The computer works out which key was pressed by checking the screen FThe keyboard controller identifies the key and sends its character code to the computer. The screen is an output device and plays no part in identifying keys.

Definitions

keyboard

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
IF keyPressed = TRUE THEN circuit ← ______ ENDIF
2.
character ← "A" keyCode ← ___(character)
3.
keyCode ← ASC("A") SEND _______ TO computer
4.
_____ text OUTPUT text
5.
keyCode ← 72 character ← ___(keyCode)

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A WHEN a key is pressed
B WHEN a key is released
C controller identifies key
D character code is sent
Question 2
A WHEN key is pressed
B circuit ← OPEN
C code ← IDENTIFY(circuit)
D SEND code TO computer
Question 3
A key ← 'H'
B circuit ← CLOSED
C code ← ASCII(circuit)
D SEND code TO computer
Question 4
A INPUT name FROM speaker
B message ← 'Hello ' + name
C OUTPUT message
Question 5
A FOR i ← 1 TO 3
B OUTPUT letter TO keyboard
C text ← text + letter
D NEXT i

Answer Key

Keyboard
Section A: Quick Questions
Q1
B — The key press completes a circuit
Q2
A — The keyboard controller
Q3
A — The character code for that key
Q4
B — Input device
Q5
A — Typing text and commands
Section B: Match the Pairs
Q1
keyboard → An input device where pressing a key completes a circuit and sends that key's character code to the computer
Q2
character code → The number the keyboard sends to the computer to show which key was pressed
Q3
Pressing a key closes a circuit, so the keyboard controller can identify which key was pressed → key press -> circuit closed -> controller identifies key
Q4
A keyboard is used to enter text and commands by sending a key's character code to the computer → press 'A' -> code sent -> 'A' appears on screen
Q5
Pressing a key opens the circuit, so the keyboard sends the code → Pressing a key closes (completes) the circuit, not opens it. The completed circuit is what lets the keyboard detect the key press.
Q6
The computer works out which key was pressed by checking the screen → The keyboard controller identifies the key and sends its character code to the computer. The screen is an output device and plays no part in identifying keys.
Section C: Definitions
Q1
keyboard — An input device where pressing a key completes a circuit. The controller identifies the key and sends its character code to the computer, so text and commands can be entered.
Section D: Fill in the Blanks
Q1
IF keyPressed = TRUE THEN circuit ← CLOSED ENDIF
Q2
character ← "A" keyCode ← ASC(character)
Q3
keyCode ← ASC("A") SEND keyCode TO computer
Q4
INPUT text OUTPUT text
Q5
keyCode ← 72 character ← CHR(keyCode)
Section E: Spot the Error
Q1
B — Pressing a key is what completes the circuit and starts the process. Line 1 should be: WHEN a key is pressed.
Q2
B — Pressing a key closes the circuit under it, it does not leave it open. Line 2 should be: circuit ← CLOSED.
Q3
C — The character code belongs to the key that was identified, not to the circuit. Line 3 should be: code ← ASCII(key).
Q4
A — A keyboard is the input device used to type text. A speaker is an output device. Line 1 should be: INPUT name FROM keyboard.
Q5
B — A keyboard is an input device, so data comes FROM it and cannot be output TO it. Line 2 should be: INPUT letter FROM keyboard.