x configuration

Fábio Mendes niels_bohr at uol.com.br
Tue Sep 21 06:05:51 UTC 2004


On Tue, 2004-09-21 at 06:40 +0200, Fabio Massimo Di Nitto wrote:
> On Mon, 20 Sep 2004, Fábio Mendes wrote:
> 
> > > > Of course! here it goes (it's the standart configuration for most
> > > > brazillian keyboards:
> > > >
> > > > Section "InputDevice"
> > > >         Identifier      "Generic Keyboard"
> > > >         Driver          "keyboard"
> > > >         Option          "CoreKeyboard"
> > > >         Option          "XkbRules"      "xfree86"
> > > >         Option          "XkbModel"      "abnt2"
> > > >         Option          "XkbLayout"     "br"
> > > >         Option          "XkbVariant"    "abnt2"
> > > > EndSection
> > >
> > > And what is your LANG??
> > >
> > > echo $LANG
> > >
> > The LANG variable is not set as I use english (C/POSIX) as the default
> > language for my desktop, but the keyboard layout is brazillian and IMHO
> > the X configuration should match the keyboard map for console not the
> > default language. The default locale for brazillian portuguese
> > (from /etc/locale.gen) is pt_BR ISO-8859-1.
> 
> I checked again the code and the pt_BR would set the keyboard layout br
> but not the Model and Variant. Can you confirm that these values are
> mandatory for brasilian keyboards? all of them?

The d-i asks the user for the default keyboard map on the system (at
least in expert mode) so probably we should use this information instead
of LANG. The user may want a system in a language that is different from
that of his keyboard and those things are not equivalent anyway (it
could have more than one keyboard model for a given language). 

There is, in fact more than one keyboards layout in brazil, but most, if
not all models are now standatized in the abnt2 (the brazillian ISO)
specification. You still find legacy keyboards but I guess most of them
are the US layout (104 keys, but some very old 386 (or XT?) era
keyboards have a different brazillian kbmap. Of course (it's not so
rare) some vendors will sell non-standard or even portuguese layout
keyboard as abnt2, but users should never buy those crap keyboards
anyway. So i think it's pretty safe to go with abnt2 here. The XkbModel
is mandadory, but the variant is not. Actually I can't tell the
difference between both, but I think (my memory fails here) that it was
needed to get the win-keys working or something like that so I just get
used to defining it in all my installations.

-Fabio




More information about the ubuntu-users mailing list