Summary: | GTK apps do not respect keyboard layout on wayland session | ||
---|---|---|---|
Product: | [Applications] systemsettings | Reporter: | Mikel Pérez <io> |
Component: | kcm_keyboard | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | aleixpol, butirsky, cgigcp3yqt, kilgore.trout, nate, vsanchez |
Priority: | NOR | ||
Version: | 5.23.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Mikel Pérez
2021-10-19 02:55:32 UTC
this happens when the ibus tray icon is present. right now it is and these process are running: mikel 654866 0.3 0.0 536888 13380 ? Sl 11:03 0:00 /usr/bin/ibus-daemon -r --xim mikel 654900 0.0 0.0 449480 7536 ? Sl 11:03 0:00 /usr/libexec/ibus-dconf mikel 654901 1.0 0.3 3536140 106860 ? Sl 11:03 0:01 /usr/libexec/ibus-ui-gtk3 mikel 654908 1.8 0.1 579544 46240 ? Sl 11:03 0:01 /usr/libexec/ibus-extension-gtk3 mikel 654910 0.1 0.1 2166532 62152 ? Sl 11:03 0:00 /usr/libexec/ibus-x11 --kill-daemon mikel 654919 0.0 0.0 449176 6728 ? Ssl 11:03 0:00 /usr/libexec/ibus-portal mikel 655104 0.0 0.0 375416 7448 ? Sl 11:03 0:00 /usr/libexec/ibus-engine-simple mikel 709968 0.0 0.0 221532 860 pts/2 S+ 11:05 0:00 grep --color=auto ibus sometimes it does not autostart and doesn't happen and gtk apps follow KDE keyboard layout IIRC that was considered as packaging issue so that ibus is pulled as dependency and started by default. Are you running Wayland? What I find is that the keyboard layout is not set correctly for the XWayland session. In my case, I have defined the "latam" keyboard in the configuration but Xwayland is receiving the "es" (Spanish) layout. Typing: setxbmap latam "fixes" the situation but it needs to be done everytime. (In reply to Victor Sanchez from comment #3) > Are you running Wayland? What I find is that the keyboard layout is not set > correctly for the XWayland session. In my case, I have defined the "latam" > keyboard in the configuration but Xwayland is receiving the "es" (Spanish) > layout. > > Typing: > > setxbmap latam > > "fixes" the situation but it needs to be done everytime. Yes I am. Doesn't happen on the X11 session *** Bug 444122 has been marked as a duplicate of this bug. *** I had the same problem, but solved it to a limited extent.
kwin send keymap change callback to gtk application. At that time keymap is created with KConfigGroup variable.
> const QByteArray model = m_configGroup.readEntry("Model", "pc104").toLatin1();
> const QByteArray layout = m_configGroup.readEntry("LayoutList").toLatin1();
> const QByteArray variant = m_configGroup.readEntry("VariantList").toLatin1();
> const QByteArray options = m_configGroup.readEntry("Options").toLatin1();
>
> xkb_rule_names ruleNames = {
> .rules = nullptr,
> .model = model.constData(),
> .layout = layout.constData(),
> .variant = variant.constData(),
> .options = nullptr,
> };
So, SytemSettings > Input Device > Keyboard > Layout > Layout Settings of top item is respected.
But this settings is cleared at system reboot :(
It is curiously that this problem doesn't occur in qt applications, but I think it is solved by the input method through the platforminputcontexts plugin. (In reply to Victor Sanchez from comment #3) > Are you running Wayland? What I find is that the keyboard layout is not set > correctly for the XWayland session. [...] (In reply to Nate Graham from comment #5) > *** Bug 444122 has been marked as a duplicate of this bug. *** I think I may have originally missed the XWayland or was very vague just replying that yes I was running Wayland and that it didn't happen on the X11 session, sorry about that I can't remember lol. Anyways, this isn't happening to me anymore and I've also tried with GDK_BACKEND=x11 so it isn't broken on XWayland either. I don't know what fixed this nor when so I'm going to close it as RESOLVED WORKSFORME. |