Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!hpda!hpcuhc!hpspcoi!rlim From: rlim@hpspcoi.HP.COM (Ruth Lim) Newsgroups: comp.os.msdos.programmer Subject: Re: What are Scancode sets? Message-ID: <15040002@hpspcoi.HP.COM> Date: 4 Oct 90 16:42:24 GMT References: <15040001@hpspcoi.HP.COM> Organization: HP PCG, Sunnyvale CA Lines: 31 A while earlier, I posted a question regarding the keyboard scancode sets. I received an explanation which I thought was really good. The answer I received follows in part. Once again, I would like to thank Robert A. Lerche for his great answer. "I take it you are referring to scan codes as generated by the keyboard. This is a somewhat involved story. "The original PC keyboard has 83 keys. The scan codes it generates go from 01H to 53H for make (as I recall), with the high order bit on for break (each key generates a separate code for make (press down) and break (release)). "The 84-key AT keyboard generates a completely different set of scan codes and uses a special prefix (0F0H) to indicate break. On the AT motherboard there's a processor which translates the AT keyboard's codes into the original codes generated by the old PC keyboard. This translation can be disabled by sending the appropriate command to the processor (it's at port 64H if I recall correctly -- I don't have the manual handy). "The 101/102 key "extended" keyboards generate yet another set of scan codes. In their normal mode they more-or-less emulate the 84-key AT keyboard (plus adding special 0E0H escape codes to distinguish the cursor pad keys from the numeric pad/cursor keys). In _their_ native mode they emit a completely different set of codes. I don't know of any application that uses the native scan codes of the 101-key keyboard. "The 84-key and 101/102-key keyboards can accept commands from the system unit to control the lights, typeamatic rate, etc. The original PC keyboard was input only."