home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / msdos / programm / 12440 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  1.6 KB

  1. Path: sparky!uunet!cs.utexas.edu!uwm.edu!linac!att!mcdchg!mcdphx!mcspdx!cah
  2. From: cah@pdx.csd.mot.com (Chris Huey)
  3. Newsgroups: comp.os.msdos.programmer
  4. Subject: Re: Reading the arrow keys... how?
  5. Message-ID: <1447@pdxvme.pdx.csd.mot.com>
  6. Date: 25 Jan 93 19:12:28 GMT
  7. References: <1993Jan23.193041.19858@druid.uucp>
  8. Organization: Motorola, Beaverton, OR
  9. Lines: 22
  10. X-Newsreader: TIN [version 1.1 PL6]
  11.  
  12. D'Arcy J.M. Cain (darcy@druid.uucp) wrote:
  13. : rnichols@cbnewsg.cb.att.com (robert.k.nichols) writes:
  14. : >In article <1jmeupINN4g9@savoy.cc.williams.edu> 93gke@williams.edu (Just Ask The Axis) writes:
  15. : >>I am trying to read the arrow keys from a PC keyboard in C. So far
  16. : >You can use getch() to read the arrow keys.  The extended keys all
  17. : >return a 2-byte sequence, with the first byte being either 0 or 0xE0.
  18. : Where did you get that 0xE0?  It returns a zero byte followed by the
  19. : scan code.
  20. The E0 (as the Norton guide will tell you) comes directly from the keyboard
  21. and is read by INT 9.  It is sent by the extended keys on 101 (and greater)
  22. key keyboards.  Ie: the cursor movement, home, end, insert, delete keys,
  23. etc. all prefix their scan codes with an E0.  Note that the numeric island
  24. keys do not prefix with an E0.  They just send the scan code - as you were
  25. describing.  Naturally, the 84 key keyboard knows nothing about E0 codes.
  26.  
  27. -- 
  28. Chris Huey                                               Motorola Computer Group
  29. cah@pdx.csd.mot.com                                      Voice: (503) 520-5215
  30.  "I lost my job last month.  Actually, I didn't really lose it.  I know right
  31.  where it is.  There's just some other guy doing it now." -- Steven Wright
  32.