From: Pixel <[EMAIL PROTECTED]>
Subject: patch for keytable translation
Date: 28 Mar 2000 22:23:07 +0200
> Here is a patch to enable simple translation of chars.
>
> It's quite simple. I renamed the getkey definitions to raw_getkey,
> and added a
> wrapper function getkey.
It should be merged with the "setkey" mechanism, I think. Having two
methods for the same purpose is not desirable, as that confuses the
maintenance.
> Limitation: it doesn't work for keystrokes with ctrl. If someone can
> tell me how
> it works...
That's the reason why I created two layers for the key
translation. So GRUB has two keymaps named "bios_key_map" and
"ascii_key_map". The former is referred in the interrupt handler for
INT 15h, AH=4F, which is called automatically when BIOS receives a
hardware interrupt from a keyboard. This is run before dealing with
any modifier key function such as Ctrl or CapsLock, so can be used,
say, to swap Ctrl with CapsLock. On the other hand, the latter is
completely user-land translating like your patch. This is useful when
you want to modify the translation for a printable character, since
some complex translations such as Shift are done before looking up
ASCII_KEY_MAP. Please see "stage2/asm.S" for more information. If you
have any question, feel free to ask it.
Okuji