You are not logged in.

#1 2021-04-25 21:01:34

radiobla
Member
Registered: 2020-02-19
Posts: 65

[SOLVED] Keyboard layout doesn't work properly with KDE apps

TL;DR: First of all, locale.conf was set to 'en_US.UTF8' instead of 'en_US.UTF-8'. After correcting that, the dead keys worked, but I had to edit '/usr/share/X11/locale/en_US.UTF-8/Compose' to make the US Keyboard work properly with 'c cedilla'. In my native language, the expected result of '<dead_acute> + <C>' would be 'Ç', but en_US locale gives 'Ć'.

I'm facing a problem with Keyboard layout and KDE apps.

I've set up the proper layout in Plasma Settings > Hardware > Input Devices > Keyboard. It's using "English (US)" layout and "English (US, intl with dead keys)".

However, only with KDE apps (such as Konsole, Kate) the dead keys chars are not even showing up when I type them.

If I try to type a tilde ( ~ + [space bar] ) [only in KDE apps], the character just doesn't appear. The same happens with cedilla (acute accent + 'c', which shows just a plain 'c') and accents (á é í ó ú - which shows just the plain letters: a e i o u; when I type acute accent + character).

% setxkbmap -query
rules:      evdev
model:      pc105
layout:     us
variant:    intl
% cat /etc/vconsole.conf 
KEYMAP=br-latin1-us
% cat /etc/locale.conf 
LANG=en_US.UTF8

I set the QT_IM_MODULE environment variable to "cedilla" as follows:

% cat /etc/environment 
GTK_IM_MODULE=cedilla
QT_IM_MODULE=cedilla

It works fine as I type here with Firefox (ç ã ~ á é í ó ú), even being on KDE. I suppose that Firefox uses some kind of GTK "backend" for input.

The keyboard works fine for TTY (br-latin1-us layout) and for GTK apps. Also, it works fine on XFCE (system-wide), but not for QT/KDE applications.

If I open a GTK application (such as mousepad) in XFCE, it works fine. If I open the same app on KDE it still works fine, but if I try the same with Kate or Konsole, that problem happens.

I've tried other layout options, but the behavior of not showing "dead keys" (characters) still happens in KDE.

Everything was working fine on my previous Arch Linux install.

Any suggestions?

Last edited by radiobla (2021-04-27 01:50:17)

Offline

#2 2021-04-25 21:14:36

radiobla
Member
Registered: 2020-02-19
Posts: 65

Re: [SOLVED] Keyboard layout doesn't work properly with KDE apps

Some complementary information:

% pacman -Qi qt6-base
Name            : qt6-base
Version         : 6.0.3-2
% pacman -Qi plasma-desktop
Name            : plasma-desktop
Version         : 5.21.4-1
% pacman -Qi xorg-server 
Name            : xorg-server
Version         : 1.20.11-1
% pacman -Qi xorg-setxkbmap
Name            : xorg-setxkbmap
Version         : 1.3.2-2

Offline

#3 2021-04-25 21:20:05

seth
Member
Registered: 2012-09-03
Posts: 51,351

Re: [SOLVED] Keyboard layout doesn't work properly with KDE apps

cat ~/.XCompose
stat /usr/share/X11/locale/en_US.UTF-8/Compose
pacman -Qkk libX11
loginctl session-status

Online

#4 2021-04-25 21:38:59

radiobla
Member
Registered: 2020-02-19
Posts: 65

Re: [SOLVED] Keyboard layout doesn't work properly with KDE apps

% stat /usr/share/X11/locale/en_US.UTF-8/Compose 
  File: /usr/share/X11/locale/en_US.UTF-8/Compose
  Size: 579389    	Blocks: 1136       IO Block: 4096   regular file
Device: fe00h/65024d	Inode: 14549046    Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2021-04-25 16:30:58.423839910
Modify: 2021-04-25 16:29:42.330504449
Change: 2021-04-25 16:29:42.340504450
 Birth: 2021-04-25 16:29:42.327171115

* I made a change on Compose file in order to use "<dead_acute> + c" instead of AltGR. I can restore it if that's the case.

% pacman -Qkk libx11
warning: libx11: /usr/share/X11/locale/en_US.UTF-8/Compose (Modification time mismatch)
warning: libx11: /usr/share/X11/locale/en_US.UTF-8/Compose (Size mismatch)
libx11: 1264 total files, 1 altered file
% loginctl session-status
5 - username (1000)
           Since: Sun 2021-04-25 17:46:39; 47min ago
          Leader: 3332 (sddm-helper)
            Seat: seat0; vc2
         Display: :0
         Service: sddm; type x11; class user
         Desktop: KDE
           State: active
            Unit: session-5.scope
                  ├─3332 /usr/lib/sddm/sddm-helper --socket /tmp/sddm-auth51520089-609d-4a15-a1bc-0307b5061853 --id 1 --start /usr/bin/startplasma-x11 --user username
                  ├─3336 /usr/bin/kwalletd5 --pam-login 7 8
                  ├─3337 /usr/bin/startplasma-x11
                  ├─3362 /usr/lib/kf5/start_kdeinit
                  ├─3363 kdeinit5: Running...
                  ├─3365 /usr/lib/kf5/klauncher --fd=9
                  ├─3384 /usr/bin/kded5
                  ├─3388 /usr/bin/kwin_x11
                  ├─3423 /usr/bin/ksmserver
                  ├─3435 /usr/lib/polkit-kde-authentication-agent-1
                  ├─3437 /usr/bin/xembedsniproxy
                  ├─3439 /usr/bin/kaccess
                  ├─3449 /usr/bin/plasmashell
                  ├─3453 /usr/lib/org_kde_powerdevil
                  ├─3485 /usr/bin/gmenudbusmenuproxy
                  ├─3488 /usr/lib/DiscoverNotifier
                  └─3926 file.so [kdeinit5] file local:/run/user/1000/klauncherdPOTxM.1.slave-socket local:/run/user/1000/kded5BLlOXG.1.slave-socket

Apr 25 18:16:46 kwin_x11[3388]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 52113, resource id: 54525955, major code: 15 (QueryTree), minor >
Apr 25 18:16:46 kwin_x11[3388]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 52210, resource id: 37749172, major code: 18 (ChangeProperty), m>
Apr 25 18:20:45 plasmashell[3449]: qrc:/plasma/plasmoids/org.kde.plasma.volume/contents/ui/ListItemBase.qml:231: TypeError: Cannot read property 'visible' of nu>
Apr 25 18:23:49 plasmashell[3449]: qrc:/plasma/plasmoids/org.kde.plasma.volume/contents/ui/ListItemBase.qml:231: TypeError: Cannot read property 'visible' of nu>
Apr 25 18:29:04 plasmashell[3449]: qrc:/plasma/plasmoids/org.kde.plasma.volume/contents/ui/ListItemBase.qml:231: TypeError: Cannot read property 'visible' of nu>
Apr 25 18:29:57 kwin_x11[3388]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 2643, resource id: 37749175, major code: 18 (ChangeProperty), mi>
Apr 25 18:30:23 plasmashell[3449]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/main.qml:464: TypeError: Value is undefined and cou>
Apr 25 18:30:23 kwin_x11[3388]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 5272, resource id: 37749177, major code: 18 (ChangeProperty), mi>
Apr 25 18:30:23 plasmashell[3449]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:379: Unable to assign [undefined] to QStri>
Apr 25 18:32:38 plasmashell[3449]: qrc:/plasma/plasmoids/org.kde.plasma.volume/contents/ui/ListItemBase.qml:231: TypeError: Cannot read property 'visible' of nu

I wasn't able to get the complete error messages at the bottom. Is there a way to just "cat" them?

Offline

#5 2021-04-25 21:42:08

radiobla
Member
Registered: 2020-02-19
Posts: 65

Re: [SOLVED] Keyboard layout doesn't work properly with KDE apps

I don't have a "~/.XCompose" file, BTW.

Offline

#6 2021-04-25 21:45:46

seth
Member
Registered: 2012-09-03
Posts: 51,351

Re: [SOLVED] Keyboard layout doesn't work properly with KDE apps

"--no-pager" but "I made a change on Compose file" sounds supicious enough.
Please backup your file (so we can see what went wrong in case) and undo that change (in doubt re-install libx11) and test the impact.

I assume ~/.XCompose doesn't exist? - edit: crosstalk
That's good for the mooment, but you later want to use it to adjust the global XCompose and you want to then start it with

include "/usr/share/X11/locale/en_US.UTF-8/Compose"

Last edited by seth (2021-04-25 21:46:27)

Online

#7 2021-04-25 21:47:11

radiobla
Member
Registered: 2020-02-19
Posts: 65

Re: [SOLVED] Keyboard layout doesn't work properly with KDE apps

The following errors happens whenever I try to type a "dead key".

Apr 25 18:44:43 plasmashell[3449]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/main.qml:464: TypeError: Value is undef…to an object
Apr 25 18:44:43 plasmashell[3449]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:379: Unable to assign [undefin…] to QString
Apr 25 18:45:27 plasmashell[3449]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/main.qml:464: TypeError: Value is undef…to an object
Apr 25 18:45:27 plasmashell[3449]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/main.qml:464: TypeError: Value is undef…to an object

I used "loginctl session-status --no-pager", but I can't get the full error message.

Offline

#8 2021-04-25 21:50:13

seth
Member
Registered: 2012-09-03
Posts: 51,351

Re: [SOLVED] Keyboard layout doesn't work properly with KDE apps

loginctl --no-pager session-status | curl -F 'f:1=<-' ix.io

Online

#9 2021-04-25 21:54:05

radiobla
Member
Registered: 2020-02-19
Posts: 65

Re: [SOLVED] Keyboard layout doesn't work properly with KDE apps

I restored the Compose file by reinstalling "libx11" package, rebooted the machine, but the issue still happens.

Apr 25 18:49:50 plasmashell[875]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:379: Unable to assign [undefined] to QString
Apr 25 18:49:50 plasmashell[875]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/main.qml:464: TypeError: Cannot read property 'length' of undefined
Apr 25 18:50:17 plasmashell[875]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/main.qml:464: TypeError: Cannot read property 'length' of undefined
Apr 25 18:50:18 plasmashell[875]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:379: Unable to assign [undefined] to QString
Apr 25 18:50:20 kwin_x11[797]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 13152, resource id: 14680964, major code: 3 (GetWindowAttributes), minor code: 0
Apr 25 18:50:20 kwin_x11[797]: qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 13153, resource id: 14680964, major code: 14 (GetGeometry), minor code: 0
Apr 25 18:50:21 kwin_x11[797]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 13589, resource id: 33554560, major code: 18 (ChangeProperty), minor code: 0
Apr 25 18:50:51 plasmashell[875]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/main.qml:464: TypeError: Cannot read property 'length' of undefined
Apr 25 18:50:51 plasmashell[875]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:379: Unable to assign [undefined] to QString
Apr 25 18:51:23 kwin_x11[797]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 28015, resource id: 54526024, major code: 15 (QueryTree), minor code: 0
Apr 25 18:55:15 plasmashell[875]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/main.qml:464: TypeError: Cannot read property 'length' of undefined
Apr 25 18:55:15 plasmashell[875]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:379: Unable to assign [undefined] to QString

The last error messages happens when I open Konsole, for example.

Last edited by radiobla (2021-04-25 21:56:06)

Offline

#10 2021-04-25 22:03:42

seth
Member
Registered: 2012-09-03
Posts: 51,351

Re: [SOLVED] Keyboard layout doesn't work properly with KDE apps

QT_IM_MODULE=cedilla

What package provides that IM?
There're some google results pointing to 10 year old threads, but neither the arch nor the gentoo wiki know it (nor do I, obviously)

Online

#11 2021-04-25 22:07:48

radiobla
Member
Registered: 2020-02-19
Posts: 65

Re: [SOLVED] Keyboard layout doesn't work properly with KDE apps

I don't know either.

I saw a few posts from 10 years ago too! I don't know what else to do.

Offline

#12 2021-04-25 22:11:43

seth
Member
Registered: 2012-09-03
Posts: 51,351

Re: [SOLVED] Keyboard layout doesn't work properly with KDE apps

Remove those environment variables again.

Online

#13 2021-04-25 22:16:16

radiobla
Member
Registered: 2020-02-19
Posts: 65

Re: [SOLVED] Keyboard layout doesn't work properly with KDE apps

I did remove both GTK_IM_MODULE and QT_IM_MODULE, but nothing changed yet. GTK apps keep working correctly, but QT/KDE don't.

EDIT: I did a reboot too.

Last edited by radiobla (2021-04-25 22:18:03)

Offline

#14 2021-04-26 04:51:58

seth
Member
Registered: 2012-09-03
Posts: 51,351

Re: [SOLVED] Keyboard layout doesn't work properly with KDE apps

This here is about a similar problem for KDE on wayland only and the workaround was to unset QT_IM_MODULE …
https://bbs.archlinux.org/viewtopic.php … 9#p1957849

echo $XDG_SESSION_TYPE
loginctl session-status

Online

#15 2021-04-26 16:13:49

radiobla
Member
Registered: 2020-02-19
Posts: 65

Re: [SOLVED] Keyboard layout doesn't work properly with KDE apps

Unfortunately, this solution haven't solved the issue.

% echo $QT_IM_MODULE 

% echo $XDG_SESSION_TYPE
x11

QT_IM_MODULE was set, but with no value.

It seems to be a bug. I'm gonna have to leave KDE for some time.

Any other insights?

Offline

#16 2021-04-26 16:16:48

radiobla
Member
Registered: 2020-02-19
Posts: 65

Re: [SOLVED] Keyboard layout doesn't work properly with KDE apps

These errors keep showing when I open Konsole, for example.

Apr 26 13:14:39 plasmashell[761]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/main.qml:464: TypeError: Cannot read property 'length' of undefined
Apr 26 13:14:39 plasmashell[761]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/main.qml:464: TypeError: Cannot read property 'length' of undefined

Thanks

Offline

#17 2021-04-26 16:26:04

seth
Member
Registered: 2012-09-03
Posts: 51,351

Re: [SOLVED] Keyboard layout doesn't work properly with KDE apps

That's an unrelated bug in the taskmanager UI QML (your windowlist in the panel) because QML is written webdeveloper style (poke around until it somehow works)…
You can ignore them, they're not input related.

Does

QT_IM_MODULE="xim"

work?

Online

#18 2021-04-26 16:29:51

radiobla
Member
Registered: 2020-02-19
Posts: 65

Re: [SOLVED] Keyboard layout doesn't work properly with KDE apps

I tried with the following values:

% QT_IM_MODULE=cedilla konsole    
qt.xkb.compose: failed to create compose table

% QT_IM_MODULE=xim konsole    
qt.xkb.compose: failed to create compose table

% QT_IM_MODULE= konsole     
qt.xkb.compose: failed to create compose table

The result is the same regardless the value on QT_IM_MODULE. I tried with "xim" value and reboot too, but no success.

I can't conceive that everything works fine on GTK-based apps and not on QT-based ones.

Offline

#19 2021-04-26 16:40:22

seth
Member
Registered: 2012-09-03
Posts: 51,351

Re: [SOLVED] Keyboard layout doesn't work properly with KDE apps

qt.xkb.compose: failed to create compose table

There's something unparsable in the compose file.

strace konsole 2>&1 | grep -i compose



FUCK.

LANG=en_US.UTF8



Fuck.

LANG=en_US.UTF-8


I could have seen this.

Fuck.

Online

#20 2021-04-26 16:52:11

radiobla
Member
Registered: 2020-02-19
Posts: 65

Re: [SOLVED] Keyboard layout doesn't work properly with KDE apps

Thanks for pointing it out, Seth.

I fixed my /etc/locale.conf and reboot:

% cat /etc/locale.conf 
LANG=en_US.UTF-8
% echo $LANG
en_US.UTF-8

I'll try to set it manually on ~/.config/plasma-localerc. Hold on that it seems to be the solution. I let you know.

Offline

#21 2021-04-26 17:11:18

radiobla
Member
Registered: 2020-02-19
Posts: 65

Re: [SOLVED] Keyboard layout doesn't work properly with KDE apps

The plasma-localerc seems to be correct now:

% cat .config/plasma-localerc
[Formats]
LANG=en_US.UTF-8

I tried both modifying the file and deleting it. It made no progress on my current local user session.

However, I created a new user with no previous settings and I see a progress. Now the "<acute accent> + c" shows a c with acute accent. It's a progress. The locale was indeed wrong.

I can "fix" the Compose file, however I'll have to do that every time libx11 gets upgraded. Am I wrong?

I deleted everything I saw from KDE Plasma on my .cache directory, but it had not effect.

Internet says to delete ".kde/share/config/plasma-*" but I'm afraid to lose all KDE configuration that I've made.

Is there any other KDE configuration that you would recommend me to delete?

Last edited by radiobla (2021-04-26 17:13:00)

Offline

#22 2021-04-26 17:37:54

radiobla
Member
Registered: 2020-02-19
Posts: 65

Re: [SOLVED] Keyboard layout doesn't work properly with KDE apps

It's working properly now.

I had to edit the Compose file to respond correctly to the cedilla, delete .XCompose (touch'ed by myself for testing) and plasma-localerc.

Thanks a lot, Seth!

Offline

#23 2021-04-26 20:07:21

seth
Member
Registered: 2012-09-03
Posts: 51,351

Re: [SOLVED] Keyboard layout doesn't work properly with KDE apps

You probably want to re-establish the local ~/.XCompose in order to stabilize your local changes (if you still need them) against libx11 updates.
Just make sure to include the global file (see post #6)


Also please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Online

#24 2021-04-27 02:11:23

radiobla
Member
Registered: 2020-02-19
Posts: 65

Re: [SOLVED] Keyboard layout doesn't work properly with KDE apps

Thank you!

I've made the changes to local ~/.XCompose file. It is as below:

$ cat .XCompose 
include "%L"

<dead_acute> <c> : "ç" ccedilla
<dead_acute> <Ç> : "Ç" ccedilla

Everything seems to be working.

Helpful resource: https://wiki.debian.org/XCompose

Offline

Board footer

Powered by FluxBB