[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#594992: keyboard-configuration: add brazilian abnt2 model to the list of keyboards

Quoting Samuel Thibault (sthibault@debian.org):
> reassign 594992 kbd-chooser
> thanks
> Gunther Furtado, le Sat 04 Sep 2010 14:50:42 -0300, a écrit :
> > The questions appears in this order.
> > 
> > 1. Please choose the language used for the instalation process...
> > Portuguese (Brazil)
> > 
> > 2. Location
> > 
> > 3. Keymap to use for a USB keyboard
> >   there is no Brazilian otpion here!!!
> Ok, so that's why.  This is kbd-chooser and not console-setup, and
> kbd-chooser indeed doesn't have such choice.

Keymaps are provided by console-data.

But console-data *doesn't* have a keymap for Brazilian ABNT2 layout in
its "mac" directory.

And these are what's used when one is choosing "USB keyboard":

Template: console-keymaps-usb/keymap
Type: select
Choices-C: mac-usb-us, mac-usb-be, mac-usb-uk, mac-usb-dk-latin1, mac-usb-dvorak, mac-usb-fi-latin1, mac-usb-fr, mac-usb-de-latin1-nodeadkeys, it, mac-usb-it, mac-usb-pt-latin1
, mac-usb-es, mac-usb-se, mac-usb-fr_CH-latin1, mac-usb-de_CH
__Choices: American English, Belgian, British English, Danish, Dvorak, Finnish, French, German, Italian, Italian, Portuguese, Spanish, Swedish, Swiss French, Swiss German
_Description: Keymap to use for a USB keyboard:

What I think is happening here is that the PowerPC installer follows
*by default* a path for keymap choice that goes through "USB keyboard"
which, itself, leads to the choice of keymaps among a very restricted

See the following comment in kbd-chooser/usb-kbd.c:

static kbd_t *usb_preferred_keymap (kbd_t *keyboards, const char *subarch)
	 * It was a mistake to tie "keymaps" to "architectures": all the keymaps
	 * in console-keymaps-usb are Mac-specific (at the moment); "PC" USB keyboards
	 * all use standard "AT" keymaps. But its too close to sarge release to change design,
	 * so we go with the following hack:
	 * If the USB keyboard vendor is Apple, set PRESENT = TRUE.
	 * For other keyboard vendors and if architecture is x86 or powerpc (prep and chrp),
	 * force the installer to display the list of AT keymaps. This is needed because, for
	 * 2.6 kernels, we can not assume that a AT connector will be detected in at-kbd.c.
	 * Because of the changes in the input layer, we can now be sure that an
	 * AT keyboard layout is needed, even if an USB keyboard is detected. So we force
	 * any USB keyboard to AT and no longer include the option to select a USB keymap
	 * for all arches except powerpc which still needs the usb keymaps as otherwise
	 * the mode switch key (for accented characters) is mapped to the wrong key.

	// Always use AT keymaps for USB keyboards with 2.6 kernel (except for powerpc)
	int skip_26_kernels = 0;
#if defined (AT_KBD) && !defined(__powerpc__)
	struct utsname buf;
	if (strncmp(buf.release, "2.6", 3) == 0)
		skip_26_kernels = 1;

General problem: all this code is many years old and doesn't really
fit the current situation where USB is everywhere and the only
keyboards that are used in real life are the various flavours of
"PC"-style keyboards (overgeneralization here, of course: various Macs
do have specific layouts, so are the last sold Sun keyboards,

Immediate solution for Gunther, I think: use the installer in expert
mode and choose "AT keyboard".... Not having a PowerPC machine handy,
I can't test this, though.

Attachment: signature.asc
Description: Digital signature

Reply to: