pmb.install.setup_keymap: Fix up keymaps for Nokia n900 (MR 1972)

The Nokia n900 XkbLayout is a bit peculiar and sometimes
join two keymaps into one, for example:

    Option "XkbLayout" "fise"

For the combined finnish/swedish layout. Add the common
joined keymaps, even if not all of these countries are
yet supported.

For details see:
https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/blob/master/symbols/nokia_vndr/rx-51

I also include this link in the code so no-one gets confused.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Linus Walleij 2020-08-31 16:02:04 +02:00
parent 5d540ad4fb
commit be41c94c57
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -300,6 +300,15 @@ def setup_keymap(args):
"/etc/X11/xorg.conf.d/"],
suffix, check=False, output_return=True)
if config:
# Nokia n900 (RX-51) randomly merges some keymaps so we
# have to specify a composite keymap for a few countries. See:
# https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/blob/master/symbols/nokia_vndr/rx-51
if variant == "rx51_fi" or variant == "rx51_se":
layout = "fise"
if variant == "rx51_da" or variant == "rx51_no":
layout = "dano"
if variant == "rx51_pt" or variant == "rx51_es":
layout = "ptes"
# Multiple files can contain the keyboard layout, take last
config = config.splitlines()[-1]
old_text = "Option *\\\"XkbLayout\\\" *\\\".*\\\""