Subject: Re: port-i386/21436: i386 boot blocks can not be compiled with proper keymap
To: None <>
From: David Laight <>
List: netbsd-bugs
Date: 05/29/2003 09:15:45
On Sat, May 17, 2003 at 11:53:23AM +0100, David Laight wrote:
> > Booting an i386 with a non-US keyboard layout gives you the wrong keyboard
> > mapping at the "boot" prompt.
> The i386 bootblocks actually depend on the BIOS getting the keyboard
> layout right.  It doesn't, in itself, do a scancode => ascii translation.
> I agree that there could be serious problems especially on an azerty keyboard.
> I might think about doing something about it.
> Maybe just map the ascii codes about!
> I'll check how my uk keyboard behaves later.

The PC bios assumes a US layout - but does have translations for the keys
that are on a UK keyboard, but not on a US one (eg the |\ key by Z).

Does anyone know which keyboard is worse? and how many keys are wrong?
(in order to generate characters 0..0x7f)

I think it is adequate [1] to push all the keyboard data through:
	p = strchr(keymap, c);
	if (p)
		c = p[1];
with appropriate keymap[] - IIRC for the uk it is @"@
But I need to know how much space to reserve - is 16 bytes enough?


[1] the function keys all generate a 0 byte, not an escape sequence
so aren't messed with.

David Laight: