Message-Id: <199807012348.AAA01165@sable.ox.ac.uk> Comments: Authenticated sender is From: George Foot To: djgpp AT delorie DOT com Date: Thu, 2 Jul 1998 00:43:21 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Allegro: key[ ] / key_shifts Reply-to: george DOT foot AT merton DOT oxford DOT ac DOT uk CC: "Daniel Faur" Precedence: bulk On 1 Jul 98 at 14:24, Daniel Faur wrote: > >Did you call install_keyboard()? Otherwise, it should work fine... > > > >Also, it's easier to type, but you can use key[KEY_CONTROL] for control key > >checking. Just watch for key[KEY_LCONTROL] which checks left-right. > > I seem to recall that you should also call install_timer() so the > keyboard-handler can install an interrupt-handler. Maybe you could checkthe > return-value of install_keyboard() to see if it installed correctly. It's not necessary to `install_timer' before being able to use the keyboard routines. Also, while you can read the return value of `install_keyboard' and test for failure, it wouldn't be effective in this case because the function only returns failure if the keyboard handler was already installed. It doesn't actually detect whether or not it could install itself correctly. I don't know whether or not it would be possible to modify it to detect this; perhaps this would be a useful thing to do, since the function can fail (e.g. if the program is being run from a debugger). If it did fail it would leave the user no way to control the executing program in many cases. -- george DOT foot AT merton DOT oxford DOT ac DOT uk