]> git.ipfire.org Git - thirdparty/systemd.git/commit
find_legacy_keymap: try matching with layout order reversed 29215/head
authorAdam Williamson <awilliam@redhat.com>
Fri, 15 Sep 2023 23:02:29 +0000 (16:02 -0700)
committerAdam Williamson <awilliam@redhat.com>
Tue, 19 Sep 2023 00:06:02 +0000 (17:06 -0700)
commita22567f54ef0ca5d46b4f532c90f749fa8b53000
treef1255ad63179cf3b4695a470db5e54b67a8b27ba
parentbf09ab0184c2d84a6936f1fc4925d6ddf2b7e4c0
find_legacy_keymap: try matching with layout order reversed

The lines in kbd-model-map date back to ye olde times (RH's old
system-config-keyboard), and I think predate this bug:

https://bugzilla.redhat.com/show_bug.cgi?id=1039185

where we got strong feedback that, for 'switched' layout setups
like Russian, US English should be the *first* layout and the
native layout the *second* one. This is how anaconda and, as of
recently, gnome-initial-setup configure such cases - but that
means, if we try to use localed to convert these configurations
using kbd-model-map, we get the wrong result (we get "us" as the
console layout). See also:

https://bugzilla.redhat.com/show_bug.cgi?id=1912609

where we first noticed this wasn't working right, but sadly, we
'fixed' it with a not-really-correct bodge in anaconda instead
of doing it properly.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
src/locale/localed-util.c
src/locale/test-localed-util.c