home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / c / 20019 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.6 KB

  1. Xref: sparky comp.lang.c:20019 comp.os.msdos.programmer:12302
  2. Newsgroups: comp.lang.c,comp.os.msdos.programmer
  3. Path: sparky!uunet!spool.mu.edu!yale.edu!ira.uka.de!math.fu-berlin.de!neuro.informatik.uni-kassel.de!jochenr
  4. From: jochenr@neuro.informatik.uni-kassel.de (Jochen Ruhland)
  5. Subject: Re: Reading the arrow keys... how?
  6. Message-ID: <2TZ0O4O@math.fu-berlin.de>
  7. Sender: news@math.fu-berlin.de (Math Department)
  8. Organization: FG Neuronale Netzwerke - Uni Kassel
  9. References:  <1jmeupINN4g9@savoy.cc.williams.edu>
  10. Date: Thu, 21 Jan 1993 17:24:51 GMT
  11. Lines: 23
  12.  
  13. In article <1jmeupINN4g9@savoy.cc.williams.edu>, 93gke@williams.edu (Just Ask The Axis) writes:
  14. |> I am trying to read the arrow keys from a PC keyboard in C. So far
  15. |> the calls to getch(), getc(), getchar(), have been unsuccessful
  16. |> because the keys don't seem to have a corresponding ASCII code (they
  17. |> seem to send 2 characters..?) I also need to read some regular keys
  18. |> like Q,S, etc... 
  19. |> Could someone tell me how to read them directly, please.
  20. |> 
  21. |> Greg Ennis
  22. |> 93gke@cs.williams.edu
  23. |> 
  24. The "special" keys on a PC - Keyboard indeed consist of two chars, the
  25. first one beeing a chr(0), the second depending on the key.
  26.  
  27. You could also use direct BIOS-calls to the keyboard. Try looking if
  28. your compiler supports a conio.h include-file. You should find all
  29. necessary functions there.
  30. -- 
  31. *     FG Neuronale Netzwerke / Uni Kassel       * 
  32. *     Jochen Ruhland                            *
  33. *     Heinrich-Plett-Str. 40                    *
  34. *     D-3500 Kassel                             *
  35. *     jochenr@neuro.informatik.uni-kassel.de    *
  36.