Skip to content

Lab 3 check ​

Run the focused keyboard tests before using 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
lcom-ng test kbd
lcom-ng run --headless --script scripts/type_a_esc.mlabscript -- build/examples/keyboard_scan

Discussion prompts ​

  • Why do input libraries report both key press and key release?
  • What should happen on a parity or timeout error?
  • How would you build a "key is currently down" table from the scancode stream?

External reading ​

The LCOM keyboard introduction, scancode exercise, and interrupts-vs-polling chapter match 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.