Invalid keyboard layouts pass through

OpenSubmitted by Ludovic Courtès.
Details
One participant
  • Ludovic Courtès
Owner
unassigned
Severity
important
L
L
Ludovic Courtès wrote on 5 Apr 22:59 +0200
(address . bug-guix@gnu.org)
87zhbphcnj.fsf@inria.fr
Hello,
After a painful debugging session where I was blaming GDM for not usingthe right keyboard layout, I found that I had specified an invalidkeyboard layout variant, as in:
(keyboard-layout "fr" "does-not-exist")
‘ckbcomp’ would build a layout for the console just fine, only with awarning. Xorg would switch to the default “fr” layout (which exists)and ignore the “does-not-exist” variant.
However, GNOME Shell would reject it in ‘keyboardManager.js’ because:
[found, , , _layout, _variant] = this._xkbInfo.get_layout_info(id);
returns ‘found = false’ since ‘fr+does-not-exist’ is not found, and thusgoes on to use the US layout:
if (found) return { layout: _layout, variant: _variant }; else return { layout: DEFAULT_LAYOUT, variant: DEFAULT_VARIANT };
(This is just for GNOME Shell because again, Xorg itself installs the“fr” layout, as can be seen if you start ratpoison or similar.)
Long story short: it would be great if invalid keyboard layouts werecaught when the system is instantiated. It could be ‘ckbcomp’ errorringout, or we could have additional code that browses xkeyboard-config’s‘base.xml’ file.
Ludo’.
L
L
Ludovic Courtès wrote on 19 Sep 10:41 +0200
control message for bug #40456
(address . control@debbugs.gnu.org)
87imcatay8.fsf@gnu.org
severity 40456 importantquit
?