Skip to content

Lab 3 Check

Run the focused keyboard tests before trying to use the library from an interactive example. They verify the scancode parser, error handling, interrupt path, polling path, and timed-scan behavior with deterministic input.

sh
machinelab test kbd
machinelab run --headless --script scripts/type_a_esc.mlabscript -- build/examples/keyboard_scan

Discussion Prompts

When reviewing the lab, make sure you can explain why input libraries report both key press and key release, what should happen on a parity or timeout error, and how you would build a higher-level "key is currently down" table from the low-level scancode stream.

External Reading

The LCOM keyboard introduction, scancode exercise, and interrupts-vs-polling chapter match the shape of this lab closely. For broader reference, read OSDev on the PS/2 keyboard and PS/2 controller, plus Andries Brouwer's scancode notes.

Course/docs licensed CC BY 4.0. Code licensed MIT.