🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #2284

Testing for ALT keypress

#2284
From: Michael D Mellinger
Date: Wed, 19 Sep 1990 01:45
20 lines
1257 bytes
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
Technical Details
Message-ID: <Fdatuc52@cs.psu.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!julius.cs.uiuc.edu!psuvax1!news

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <Fdatuc52@cs.psu.edu>
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