https://bugs.kde.org/show_bug.cgi?id=470470
Bug ID: 470470
Summary: Usage of setxkbmap on Wayland resets Keyboard-Layout
to US (even if it is not configured)
Classification: Applications
Product: systemsettings
Version: 5.27.5
Platform: Archlinux
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: kcm_keyboard
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---
SUMMARY
***
While the title suggests, that a lot of random things need to happen at the
same time, i don't think this situation is as uncommon as it first seems. I've
had the following in my .bashrc:
`setxkbmap -option ctrl:nocaps 2>/dev/null`.
While I totally agree, that x-keyboard-options should be set via config file
rather than invoking them by the bashrc, it is however a totally legit way to
archieve the desired behaviour (remap capslock in this case). However, if you
have only one keyboard layout configured (just `de` in my case, no modified
layouts), any use of xkbmap seems to break the layout, and - at least for some
apps - reverts it to the `us`-layout (even it is not in my list of configured
layouts). Even more strange is, that this only seem to affect some
applications. For me the effect was most noticeable in firefox and thunderbird.
I think it is not that uncommon for people switching from xorg to wayland to
have some kind of options like this in some scripts. Especially annoying here
is, that this will never be reproducible on new installs with a fresh homedir.
Even though this clearly qualifies as "user-error", the keyboard should never
ever fall back to an unconfigured layout, and behaviour like this is not very
obvious to track down, because if you stare at it, you won't be able to observe
the error until you start a new shell.
As already assumed, calling xmodmap without redirecting the output, says that
it is running against Xwayland, which might explain different behaviours in
different windows. However, while having an xorg-compatibility layer is
awesome, having multiple keyboard layouts active at the same time depending on
the window is certainly not.
any "apply" action in the "settingsmenu/input/keyboard" subsection reverts this
behaviour to the expected state. I'd assume, there are alot of universal apps
(flatpak..) that will be affected by this, too.
***
STEPS TO REPRODUCE
1. put some `xmodmap` command in your .bashrc and start a terminal under
wayland. Alternatively execute manually.
OBSERVED RESULT
- some applications like firefox and thunderbird end up with a default, but
unconfigured and unlisted (in terms of the plasma settingsmenu) keyboard-layout
(us).
EXPECTED RESULT
- keyboard-settings should be applied uniformly between apps regardless of
wayland, Xwayland, flatpak, fullscreen-games, etc..
SOFTWARE/OS VERSIONS
- Linux/KDE Plasma: Linux/6.3.4-arch1-1
- KDE Plasma Version: 5.27.5
- KDE Frameworks Version: 5.106.0
- Qt Version: 5.15.9
All-AMD-System (Ryzen7xxx/Navi31), Single Monitor Setup.
Initially i thought this might be related to
https://bugs.kde.org/show_bug.cgi?id=433576, but it turns out unrelated, as my
behaviour perists with more than one layout as well. However, they seem
somewhat similar anyways.
--
You are receiving this mail because:
You are watching all bug changes.