From: igp AT vlc DOT servicom DOT es (Ignacio García Pérez) Newsgroups: comp.os.msdos.djgpp Subject: ALLEGRO keyboard question Date: Fri, 18 Dec 1998 08:24:40 GMT Organization: SERVICOM Lines: 43 Message-ID: <367a1144.304788@crispin> NNTP-Posting-Host: be-217-vale-x8.red.retevision.es Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Newsreader: Forte Agent 1.5/32.452 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi: Allegro keyboard handling routines are great for games and such, but have the disadvantage that you lose the installed DOS keyboard mapping, and this is what I want to keep. Why ?... because I'm not programming a game, and still need the GUI routines to work. I have two alternatives: 1- Load a keyboard map table from a .DAT file. In my case, load the spanish table, and everything works fine. But when the program goes to a foreign country, then the user will have to configure the keyboard, and what if there's no allegro keyboard map for that country ?... as opposed, we can assume if DOS is installed in that computer, the keyboard mapping will be properly configured, and if it's not, well, that's truly the user's problem, not my program's... 2- Use "install_keyboard_hooks" as the documentation says. But this works very badly. I've used the code: int my_keypressed(void) { return _bios_keybrd(_KEYBRD_READY); } int my_readkey(void) { return _bios_keybrd(_KEYBRD_READ); } ... install_keyboard_hooks((my_keypressed,my_readkey); But I get all the extended characters (above ASCII 127) wrong, and the extended keyboard works strangely too (when Num Lock is ON, some extended number keys produce the ASCII number, and some others the arrow movement). Is there a simple and effective way to make allegro use the BIOS as keyboard information provider so I can take profit from the installed DOS keyboard mapping ? Thanks. Nacho.