www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/26/02:32:15

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Swedish keyboard layout in Allegro
Date: Thu, 24 Jul 1997 20:09:09 +0100
Organization: None
Distribution: world
Message-ID: <x$N$7AAVh61zEwZG@talula.demon.co.uk>
References: <33D69348 DOT AE34B6FC AT canit DOT se>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 24
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Erik Hansson writes:
>Could anyone tell me if I can use the Allegro keyboard-routines with a
>non-american keyboard layout? When I read a key and check the
>ASCII-value, it does not check out with what I'm used to (Swedish
>keyboard layout). 

The keyboard hardware returns raw scancode numbers to my interrupt
handler, so there's no automatic way to support different keyboard
layouts. The conversion into ASCII characters is done with a couple of
lookup tables (found near the start of the file keyboard.c). Change
these tables, and all will be well...

As a more elegant solution, if you can send me suitable tables for a
Swedish keyboard and tell me how to detect when they should be used
(some DOS call, I suspect), I'll include them in the next release of
Allegro. Or even better, if anyone knows how to access the scancode-
>ascii mapping being used by DOS itself, I'd really like to know about
it! I suspect the gory details will differ between different OS
versions, but it would be nice if it could be done...


--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
Beauty is a French phonetic corruption of a short cloth neck ornament.

- Raw text -


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