I’ve installed a couple weaks ago Endeavour OS and I’m having a weird issue: I cannot switch my keyboard layout using combination that I set using localectl. I’m running GDM and Budgie and here are some of outputs that can be useful:
>gsettings get org.gnome.desktop.input-sources sources
[('xkb', 'us'), ('xkb', 'ru')]
>localectl status
System Locale: LANG=en_US.UTF-8
VC Keymap: ru
X11 Layout: ru,us
X11 Model: dell
X11 Variant: qwerty
X11 Options: grp:alt_shift_toggle
>cat /etc/vconsole.conf
KEYMAP=ru
>cat /etc/X11/xorg.conf.d/00-keyboard.conf
# Written by systemd-localed(8), read by systemd-localed and Xorg. It's
# probably wise not to edit this file manually. Use localectl(1) to
# instruct systemd-localed to update it.
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "ru,us"
Option "XkbModel" "dell"
Option "XkbVariant" "qwerty"
Option "XkbOptions" "grp:alt_shift_toggle"
EndSection
>cat /etc/X11/xorg.conf.d/20-keyboard.conf
... same stuff ...
>gsettings get org.gnome.desktop.wm.keybindings switch-input-source
['<Alt>Shift_L', '<Super>space', 'XF86Keyboard']
>cat /etc/locale.gen | grep -v \#
en_US.UTF-8 UTF-8
en_GB.UTF-8 UTF-8
en_US UTF-8
>cat /etc/locale.conf
LANG=en_US.UTF-8
Additionaly, when I’m logging in after boot, it appears that my greeter uses this file (and ignores every file listed above):
Both are normal behavior. You just have to find your way.
OTOH, just FYI, with DEs,
when Xorg runs as root, its locale setting is always passed to user session, and IIRC, overrides other user keybindings. I think that Arch has changed Xorg to run as user, or at least it is possible. GDM always runs as user, so Xorg does as well. I know LightDM uses /etc/default/, so it’s possible GDM does too. It’s how the DM devs decide to do it, not the distro.
Keybindings are a thing of the DE, if it is designed so. Exception in previous paragraph.
this looks a bit short to me…
usually, it holds more
As far as I understand, all of the mentioned variables are defaulting to what LANG is set to, so that shouldn’t be a problem.
petsam, thanks for a detailed post. There is a remaining issue: even if I configure DE and greeter with respected config files, they both ignore ALT+SHIFT combination set in the locale, even thought in DE it’s set to be used:
>gsettings get org.gnome.desktop.wm.keybindings switch-input-source
['<Alt>Shift_L', '<Super>space', 'XF86Keyboard']
It’s my limited knowledge I share. Don’t know everything. Still self educating
This is something Gnome/GDM devs know well. We are just learning by mistakes.
Here’s more:
Delete /etc/default/keyboard, unless it is owned (pacman -Qo /etc/default/keyboard) by some package (which I doubt. It’s usually written by Calamares installer default modules, to adhere to Ubu/Deb standards). Arch does not use it, but some individual packages check its existence and values).
Use same keyboard model to all configurations:
In case the above don’t fix it (check after modifications, reboot/re-login, if needed), specify us as first layout (don’t ask why, please… )
Check with xev (install it if it’s not installed). Here is an example: