www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/21/08:43:57

Message-ID: <8D53104ECD0CD211AF4000A0C9D60AE336F5E5@probe-2.Acclaim-Euro.net>
From: Shawn Hargreaves <ShawnH AT Probe DOT co DOT uk>
To: djgpp AT delorie DOT com
Subject: Re: ALLEGRO keyboard question
Date: Mon, 21 Dec 1998 13:39:52 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.0.1460.8)
Reply-To: djgpp AT delorie DOT com

igp AT vlc DOT servicom DOT es writes:
>>If you don't want to use Allegro's keyboard handler, don't install it. Or
>>you could always rewrite the GUI routines :-)
>
>That was my first try. Of course, I knew ALLEGRO GUI need the keyboard
>driver, so I followed the documentation suggestions about not
>installing it and providing the GUI with replacements for "readkey"
>and "keypressed", but it didn't work. 

When you use those hooks, the Allegro keyboard routines are totally 
ignored, so the only problem is how to find a replacement function 
that will return data in the right format. I don't know enough about 
how BIOS routines work in different locales to suggest the best way 
of doing this, sorry.

One thing to watch out for is that DOS uses different character sets 
depending on the location, but the default Allegro font is always the 
ISO Latin-1 mapping (low 256 characters of the Unicode set). So 
unless you provide a custom font for each location, the BIOS routines 
won't match up with your display code when people use the extended 
ASCII characters...

>My guess is that perhaps the GUI is using some other part of the
>keyboard driver somewhere else...

I'm as sure as I can possibly be (about 99.99%) that the GUI routines 
don't use anything other than readkey() and keypressed(), which 
completely bypass the Allegro handler after you call 
install_keyboard_hooks(). So I am afraid that you must look at your 
own input code for a solution to the problem: it is hard to see how 
this could be a fault of the Allegro routines, when they aren't even 
being called!


	Shawn Hargreaves.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019