Path: utzoo!attcan!uunet!husc6!bloom-beacon!mit-eddie!ll-xn!ames!ucsd!ucsdhub!jack!elgar!ford From: ford@elgar.UUCP (Ford Prefect ) Newsgroups: comp.sys.att Subject: Re: UNIX PC Graphics Questions Summary: Actually some random trivia about the UnixPC keyboard/mouse driver Keywords: unixpc kernel Message-ID: <152@elgar.UUCP> Date: 22 May 88 07:32:43 GMT References: <2271@inco.UUCP> <267@uncle.UUCP> <700@naucse.UUCP> <989@umbc3.UMD.EDU> Reply-To: ford@kenobi.UUCP (Mike Ditto) Organization: Omnicron Data Systems, Bonita, CA Lines: 28 In article <989@umbc3.UMD.EDU> alex@umbc3.UMD.EDU (Alex S. Crain) writes: > On this train of thought though, Does anyone know how works the >keyboard controller? and does the mouse do its work through the controller >registers, or is that different? If one of the folks with a hardware manual >could breifly explain it, I would be most appreciative. The microprocessor in the keyboard does most of the mouse work. Mouse motions are sent to the main cpu in the same stream as keystroke codes. There is a code that means "here comes some mouse info", and another code that means "Ok, back to keyboard mode". Anything in-between is to be interpreted as mouse motions (given in relative x and y distances and button states.) The keyboard data format is rather interesting. After any key transition (pressing or releasing any key) the keyboard sends an entire list of every key which is currently held down. The driver compares the new state with the previous state to see which key changed, and in which direction (pressed or released). None of this is documented, of course, even in the tech manuals. I'll let everyone guess how I discovered how it works. :-) :-) -=] Ford [=- "Once there were parking lots, (In Real Life: Mike Ditto) now it's a peaceful oasis. ford%kenobi@crash.CTS.COM This was a Pizza Hut, ...!sdcsvax!crash!kenobi!ford now it's all covered with daisies." -- Talking Heads