delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/26/22:48:33

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: Sat, 26 Jul 1997 20:37:21 +0100
Organization: None
Distribution: world
Message-ID: <Wg3GcGAxHl2zEw1G@talula.demon.co.uk>
References: <Pine DOT UW2 DOT 3 DOT 95 DOT 970726192325 DOT 5247A-100000 AT bryggen DOT bgnett DOT no>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 50
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Gisle Vanem writes:
>Here is a function to return the country-code. Sweden is 46...you'll
>find them in your telephone directory:

This could be useful: thanks!

>>> 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.

Unfortunately I don't think that is any use for. According to the
interrupt list:

    Notes:  called by INT 09 handler to translate scan codes; the INT 09 
    code does not examine the scan code it reads from the keyboard until 
    after this function returns.  This permits software to rearrange the
    keyboard; for example, swapping the CapsLock and Control keys, or
    turning the right Shift key into Enter.

To me this sounds like it's a lower level hook for use by keyboard
extenders, which takes place _before_ the BIOS does the scancode to
ascii conversion. I wrote a little test program, and on my machine
(Win95 DOS box running 4DOS) it generates a 1->1 mapping regardless of
whether I select a UK or US keyboard layout. It would be useful if you
could try this on a Swedish system, but I have a nasty feeling that it
won't output anything useful...


#include <stdio.h>
#include <dpmi.h>

int main()
{
   __dpmi_regs r;
   int i;

   for (i=0; i<128; i++) {
      r.x.ax = 0x4F00 + i;
      __dpmi_int(0x15, &r);
      printf("%d -> %d\n", i, r.x.ax&0xFF);
   }

   return 0;
}


--
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