Keymap definitions for VT / NEWCONS
Ed Maste
emaste at freebsd.org
Fri Aug 15 15:30:50 UTC 2014
On 14 August 2014 17:40, Stefan Esser <se at freebsd.org> wrote:
>
> Please look at the TAR file I prepared. I rank the symmetry
> in the format of the names higher than the shorter names.
> And in fact, keyboard layouts are often specific to a country,
> and not to a language. The 2-letter names hide the difference
> for the simple case ("fr" is really sufficient if "fr_FR" is
> meant), but if you look at syscons/keymaps there are examples
> of keymap files named after the language code and others named
> after the country code.
I've been thinking about it some more, and I think this point is
precisely why I'm not a fan of using the locale name. You're correct
that keyboard layouts are mainly correlated with location, not
strictly language, and I think the names should reflect that. Most
keymaps don't require a specific language part, but the locale scheme
puts it first.
We should be able to offer an appropriate default layout based on a
user's locale. I don't think it follows though that the keyboard
should be named the same as the locale. Using the locale name implies
a relationship between the locale and keymap that just doesn't exist.
You brought up Latin America (es_LA) as one exception so far, and the
Canadian Multilingual keyboard has a similar issue - what would we
call it? Why is the Belgian keyboard fr_BE and not nl_BE? Presumably
because it's AZERTY, but naming it fr_BE seems to imply there should
be a separate Dutch Belgian layout. Other than consistency for its own
sake, what do we gain by requiring the ab_CD naming?
For comparison, I looked at the list of keymaps in Debian/Ubuntu. They
generally use the country code, with some non-ISO 3166 2-letter short
forms (e.g. "cf" for Canadian French). For the two examples above they
use the names la-latin1 and ca-multi. I won't suggest we follow their
names in all cases since there's a lot of inconsistency (e.g. "sg" for
Swiss German, but fr_CH for Swiss French). But as an overall scheme I
like starting with the ISO 3166 country code, and adding more specific
parts where necessary.
This could give us, as examples:
be Belgian
ca-multi Canadian Multilingual
ca-fr French Canadian
ch-fr Swiss French
ch-de Swiss German
us US
For layouts not specific to a single country (Latin America, Central
Europe) we could just use longer names as today.
More information about the freebsd-hackers
mailing list