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