Date: Sat, 26 Jul 1997 19:23:58 +0200 (MET DST) From: Gisle Vanem To: djgpp AT delorie DOT com Subject: Re: Swedish keyboard layout in Allegro Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk Shawn Hargreaves said: >> 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), Here is a function to return the country-code. Sweden is 46...you'll find them in your telephone directory: char country_info[35]; int GetCountryCode (void) { if (_osmajor >= 3) { __dpmi_regs reg; reg.d.edx = 0; reg.x.ds = __tb / 16; reg.d.eax = 0x3800; __dpmi_int (0x21,®); if (reg.x.flags & 1) return 0; dosmemget (__tb,sizeof(country_info),&country_info); return reg.x.bx; } return -1; } >> 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! Check out INT 15/4F which translates scancodes. Gisle V.