From: Shawn Hargreaves 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: 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 Precedence: bulk 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.