home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.os2.programmer
- Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!mips!mips!rtech!ingres!seg
- From: seg@Ingres.COM (scott e garfinkle)
- Subject: Re: C Set/2 Problem with getch()
- Message-ID: <1992Aug26.222918.14442@pony.Ingres.COM>
- Organization: Ingres, an Ask Company
- References: <5s-n5j.feustel@netcom.com>
- Date: 26 Aug 92 22:29:18 GMT
- Lines: 25
-
- In article <5s-n5j.feustel@netcom.com> feustel@netcom.com (David Feustel) writes:
- >I'm trying to use getch() in C Set/2 to read from the keyboard with no
- >echo. Link386 reports getch() not found. I tried to install the
- >migration libraries using the os/2 install command, but I get an error
- >message that install cannot write to a write-protected a disk.
- Did you try copying the disk, then doing the instal just to see what would
- happen? getch() is, in fact, in the migration library.
-
- >Is there a way to read without echo from the keyboard in full-screen
- >mode in 32-bit code? Thanks.
- Actually, I find it just as convenient to use KbdCharIn as getch(). They
- are both 16 bit calls, anyway. Code fragment:
- #define INCL_KBD
- #include <os2.h>
- {
- KBDKEYINFO kbinfo;
- KbdCharIn(&kbinfo, IO_WAIT, 0); // use IO_NOWAIT if you don't want to wait
- if((c = kbinfo.chChar) == 0|| c == 0xe0)
- {
- extended_char= TRUE;
- c = kbinfo.chScan;
- }
- else
- extended_char = FALSE;
- }
-