Inside Macintosh Volume III has all the schematics for keyboard and mouse interfaces, including how keyboard scan codes work.
There have also been complete PDFs of the original Inside Macintosh I to III floating around the net.
http://www.weihenstephan.org/~michaste/pagetable/mac/Inside_Macintosh.pdf
There have also been complete PDFs of the original Inside Macintosh I to III floating around the net.
http://www.weihenstephan.org/~michaste/pagetable/mac/Inside_Macintosh.pdf