From: Darren Grant Newsgroups: comp.os.msdos.djgpp Subject: Re: ALLEGRO: Keyboard reading help... Date: Wed, 25 Jun 1997 18:11:11 -0700 Organization: loners anonymous Lines: 37 Message-ID: <33B1C1AF.5DE0@xl.ca> References: <33b061c3 DOT 10229116 AT usenet DOT nau DOT edu> Reply-To: darn AT xl DOT ca NNTP-Posting-Host: c27.xlent.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk install_keyboard() must be called to set up the Allegro keyboard handler. =) Don't forget to use remove_keyboard() when you're finished with it. int ch, int key; install_keyboard(); key = KEY_F; ch = readkey(); if (ch == (key << 8)) do_whatever(); else didnt_work(); remove_keyboard(); ----- Michael D. Ryan wrote: > > I want to be able to interpret an alt code from the keyboard using > allegro. I have tried doing it the way it says in the allegro.txt and > it doesn't work. > > EX: > > int ch, int key; > > key = KEY_F; > ch = readkey(); > if (ch == (key << 8)) do_whatever(); > else didnt_work(); > > It doesn't seem to recognize the keys. I have tried a whole bunch of > different combinations and no luck. > > Any help?