home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / msdos / programm / 8493 < prev    next >
Encoding:
Internet Message Format  |  1992-08-12  |  1.5 KB

  1. Path: sparky!uunet!olivea!bu.edu!rpi!usc!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!yev_g
  2. From: yev_g@athena.mit.edu (Yevgeny Gurevich)
  3. Newsgroups: comp.os.msdos.programmer
  4. Subject: Re: How do I recognize arrow keys with getch() in C?
  5. Message-ID: <1992Aug12.154540.28484@athena.mit.edu>
  6. Date: 12 Aug 92 15:45:40 GMT
  7. References: <S9a-CYB@engin.umich.edu>
  8. Sender: news@athena.mit.edu (News system)
  9. Distribution: usa
  10. Organization: Massachusetts Institute of Technology
  11. Lines: 21
  12. Nntp-Posting-Host: safdie.mit.edu
  13.  
  14. In article <S9a-CYB@engin.umich.edu> thesame@engin.umich.edu (Stephen Su) writes:
  15. >I am using Borland C++ to try and write a simple text viewer and would like
  16. >to use the up and down arrow keys and the PgUp/PgDn/Home/End keys for various
  17. >operations.  How can I recognize the keys with getch(), or am I on the wrong
  18. >track?
  19. >
  20.  
  21. I haven't used getch() to recognize the extended keyboard codes, but I
  22. know that bioskey can be used to scan for all possible keyboard
  23. inputs.  See the reference manual for a description of what it returns
  24. (it has to do with shifting 8 bits to determine what kind of input was
  25. received (normal character or extended code) and then a shift to find
  26. the actual character code.  You will need a reference book to find
  27. what extended codes to look for.  The _Programmer's PC SourceBook_ and
  28. _Programming the IBM User Interface_ (by Ben Ezzel) are two good
  29. books.
  30.  
  31. If you need further help, please email me and I can send you some of
  32. my code.
  33. --
  34. yev_g@athena.mit.edu   500 Memorial Drive, Cambridge, MA.  [ Yevgeny Gurevich ]
  35.