Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!julius.cs.uiuc.edu!psuvax1!news From: melling@cs.psu.edu (Michael D Mellinger) Newsgroups: comp.os.msdos.programmer Subject: Testing for ALT keypress Message-ID: Date: 19 Sep 90 01:45:27 GMT Sender: news@cs.psu.edu (Usenet) Distribution: comp Organization: /home/server2/melling/.organization Lines: 20 Nntp-Posting-Host: client6.cs.psu.edu I am trying to test when a user presses ALT-h, but am not having much luck. I found these two library routines in the Microsoft C 6.0 library reference manual, but they don't seem to do the trick for ALT key sequences(They work fine for Cntrl and Shift keys, however). I was masking ch with 0xff to get the proper ascii character and testing bit 3 in altpress. Is there something else that I have to do? ch = _bios_keybrd(_KEYBRD_READ); /* get keypress */ altpress = _bios_keybrd(_KEYBRD_SHIFTSTATUS); /* get modifier */ Also, what is a good C programming book for DOS and the IBM? A couple of years ago I thought that DOS would die off(OS/2 taking its place), and that I would never have to go through the drudgery of learning to program in it. It seems I was wrong :-(. -Mike