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