You are not logged in.

#1 2023-01-22 16:55:44

guissou
Member
Registered: 2022-02-25
Posts: 16

[SOLVED] dead keys not working in KDE

I am have a fr_CH keyboard layout, and am unable to use dead keys ("~", "^", "`" etc.) in some KDE apps (e.g Konsole, Systems Settings etc.), but I am able to use the dead keys normally in other apps (e.g Firefox).

$ setxkbmap -print -query
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwertz)"};
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+ch(fr)+ch:2+inet(evdev)"    };
        xkb_geometry  { include "pc(pc104)"     };
};
rules:      evdev
model:      pc104
layout:     ch,ch
variant:    fr,

I have read that the issue probably comes from the locale, but I am unsure which fields need to be change.

$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_COLLATE=C
LC_MONETARY=en_US.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
$ locale -a
C
C.UTF-8
POSIX
en_US
en_US.iso88591
en_US.utf8
fr_CH
fr_CH.iso88591
fr_CH.utf8

Do you know what could be the cause of this issue? Any pointer is welcome smile

Last edited by guissou (2023-01-27 07:32:20)

Offline

#2 2023-01-22 20:10:47

seth
Member
Registered: 2012-09-03
Posts: 35,121

Re: [SOLVED] dead keys not working in KDE

You've two layouts - how and when do you configure those?
Both (basic and fr) should™ have dead keys, but what happens for

setxkbmap -layout ch -variant ""

The locale is probably not relevant here.
Sanity check:

echo $XDG_SESSION_TYPE

Offline

#3 2023-01-25 09:02:01

guissou
Member
Registered: 2022-02-25
Posts: 16

Re: [SOLVED] dead keys not working in KDE

I am not sure why two layouts are configured. The CH keyboard comes with multiple variants, and I sometimes need to switch from ch_fr to ch_de. I may have configured this in the GUI settings.

$ setxkbmap -layout ch -variant "fr"
$ setxkbmap -print -query              

xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwertz)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+ch(fr)+inet(evdev)" };
        xkb_geometry  { include "pc(pc104)"     };
};
rules:      evdev
model:      pc104
layout:     ch
variant:    fr

I set the layout to ch with variant fr (the one I am using the most). But it didn't solve the issue with dead keys.

$ echo $XDG_SESSION_TYPE
x11

Offline

#4 2023-01-25 09:13:37

seth
Member
Registered: 2012-09-03
Posts: 35,121

Re: [SOLVED] dead keys not working in KDE

To be clear, you want to be able to press "´","e" and get you "é" - not have "´" act immediately?
https://gitlab.freedesktop.org/xkeyboar … symbols/ch still looks sane (and didn't see a lot of recent updates anyway), can you please post your /usr/share/X11/xkb/symbols/ch and also run

xev -event keyboard

and press "´","e" and post the output as well?

Offline

#5 2023-01-25 09:35:57

guissou
Member
Registered: 2022-02-25
Posts: 16

Re: [SOLVED] dead keys not working in KDE

Yes exactly. I am currently unable to enter a "~" (dead_tilde), "^" (dead_circumflex), and "`" (dead_grave) because they are all dead keys, I need to press "~" <AE12> followed by "space" or "~" again. Pressing <AE12> ("^") followed by "e" gives me a "ê"

Same behaviour for <AE11> if I press first "´" (dead_acute) and then "e".

    key <AE11> { [ apostrophe,   question,   dead_acute             ] };
    key <AE12> { [ dead_circumflex, dead_grave, dead_tilde          ] };

Pressing "^" and then "e"

xev -event keyboard
Outer window is 0x4200001, inner window is 0x4200002

KeymapNotify event, serial 24, synthetic NO, window 0x0,
    keys:  130 0   0   0   16  0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

KeyRelease event, serial 25, synthetic NO, window 0x4200001,
    root 0x9b3, subw 0x0, time 9933935, (-70,804), root:(441,1689),
    state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
    XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x4200001,
    root 0x9b3, subw 0x0, time 9934798, (-70,804), root:(441,1689),
    state 0x0, keycode 21 (keysym 0xfe52, dead_circumflex), same_screen YES,
    XLookupString gives 1 bytes: (5e) "^"
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: True

KeyPress event, serial 28, synthetic NO, window 0x4200001,
    root 0x9b3, subw 0x0, time 9934878, (-70,804), root:(441,1689),
    state 0x0, keycode 26 (keysym 0x65, e), same_screen YES,
    XLookupString gives 1 bytes: (65) "e"
    XmbLookupString gives 1 bytes: (65) "e"
    XFilterEvent returns: True

KeyPress event, serial 28, synthetic NO, window 0x4200001,
    root 0x9b3, subw 0x0, time 9934878, (-70,804), root:(441,1689),
    state 0x0, keycode 0 (keysym 0xea, ecircumflex), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 2 bytes: (c3 aa) "ê"
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x4200001,
    root 0x9b3, subw 0x0, time 9934898, (-70,804), root:(441,1689),
    state 0x0, keycode 21 (keysym 0xfe52, dead_circumflex), same_screen YES,
    XLookupString gives 1 bytes: (5e) "^"
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x4200001,
    root 0x9b3, subw 0x0, time 9935000, (-70,804), root:(441,1689),
    state 0x0, keycode 26 (keysym 0x65, e), same_screen YES,
    XLookupString gives 1 bytes: (65) "e"
    XFilterEvent returns: False

Pressing "´" (altgr + <AE11>) and then "e"

xev -event keyboard
Outer window is 0x4200001, inner window is 0x4200002

KeymapNotify event, serial 24, synthetic NO, window 0x0,
    keys:  130 0   0   0   16  0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

KeyRelease event, serial 25, synthetic NO, window 0x4200001,
    root 0x9b3, subw 0x0, time 10065364, (-185,889), root:(326,1774),
    state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
    XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x4200001,
    root 0x9b3, subw 0x0, time 10065694, (-185,889), root:(326,1774),
    state 0x0, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 92
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x4200001,
    root 0x9b3, subw 0x0, time 10065857, (-185,889), root:(326,1774),
    state 0x80, keycode 20 (keysym 0xfe51, dead_acute), same_screen YES,
    XLookupString gives 2 bytes: (c2 b4) "´"
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: True

KeyRelease event, serial 28, synthetic NO, window 0x4200001,
    root 0x9b3, subw 0x0, time 10065979, (-185,889), root:(326,1774),
    state 0x80, keycode 20 (keysym 0xfe51, dead_acute), same_screen YES,
    XLookupString gives 2 bytes: (c2 b4) "´"
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x4200001,
    root 0x9b3, subw 0x0, time 10066015, (-185,889), root:(326,1774),
    state 0x80, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 92
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x4200001,
    root 0x9b3, subw 0x0, time 10066176, (-185,889), root:(326,1774),
    state 0x0, keycode 26 (keysym 0x65, e), same_screen YES,
    XLookupString gives 1 bytes: (65) "e"
    XmbLookupString gives 1 bytes: (65) "e"
    XFilterEvent returns: True

KeyPress event, serial 28, synthetic NO, window 0x4200001,
    root 0x9b3, subw 0x0, time 10066176, (-185,889), root:(326,1774),
    state 0x0, keycode 0 (keysym 0xe9, eacute), same_screen YES,
    XKeysymToKeycode returns keycode: 47
    XLookupString gives 0 bytes: 
    XmbLookupString gives 2 bytes: (c3 a9) "é"
    XFilterEvent returns: False

KeyRelease event, serial 28, synthetic NO, window 0x4200001,
    root 0x9b3, subw 0x0, time 10066357, (-185,889), root:(326,1774),
    state 0x0, keycode 26 (keysym 0x65, e), same_screen YES,
    XLookupString gives 1 bytes: (65) "e"
    XFilterEvent returns: False

My /usr/share/X11/xkb/symbols/ch is up to date:

$ wget https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/raw/master/symbols/ch
...
2023-01-25 10:33:54 (366 KB/s) - ‘ch’ saved [7235/7235]
$ diff ch /usr/share/X11/xkb/symbols/ch
$

Offline

#6 2023-01-25 09:38:14

seth
Member
Registered: 2012-09-03
Posts: 35,121

Re: [SOLVED] dead keys not working in KDE

Yes exactly. I am currently unable to enter a "~" (dead_tilde), "^" (dead_circumflex), and "`" (dead_grave) because they are all dead keys

So you DON'T want dead keys. That's easy.

-variant fr_nodeadkeys

Last edited by seth (2023-01-25 09:38:30)

Offline

#7 2023-01-25 09:41:30

guissou
Member
Registered: 2022-02-25
Posts: 16

Re: [SOLVED] dead keys not working in KDE

No, I want to use the dead keys. I need them to compose special characters.

Offline

#8 2023-01-25 09:50:05

seth
Member
Registered: 2012-09-03
Posts: 35,121

Re: [SOLVED] dead keys not working in KDE

Ok, but this is whata happens, so the issue completely down to isolated processes misbehaving ("some KDE apps")

KDE has a feature to change the layout w/ the active window. Does the same happen in an openbox session?
If yes, some genius might have thought it would be smart if certain clients (konsole) translate the behavior.
Can you narrow down the misbehaving context?

Edit:
https://bugs.kde.org/show_bug.cgi?id=411729

printenv

Last edited by seth (2023-01-25 09:53:31)

Offline

#9 2023-01-25 10:17:39

guissou
Member
Registered: 2022-02-25
Posts: 16

Re: [SOLVED] dead keys not working in KDE

I just installed openbox.

In an openbox session, the dead keys are working as expected in konsole.

In both X11 and KDE/Openbox sessions dead keys don't print anything in konsole.

Apps where dead keys do NOT work as expected: konsole, dolphin, plasma systems settings, Discover (app store), libreoffice, vlc
Apps where dead keys work as expected: firefox, tilix, VS Code (Code OSS), signal-desktop, gimp

Offline

#10 2023-01-25 14:30:44

seth
Member
Registered: 2012-09-03
Posts: 35,121

Re: [SOLVED] dead keys not working in KDE

xev can also monitor the window in question.
Use "xwininfo" to obtain the WId (something like "0x1800009") and pass that to xev

xev -event keyboard -id 0x1800009 # use the actual WId for konsole etc.

Though if the key doesn't generate any input, it's probably the Qt/KDE bug.

Offline

#11 2023-01-25 15:03:47

guissou
Member
Registered: 2022-02-25
Posts: 16

Re: [SOLVED] dead keys not working in KDE

Thanks for the pointer to the bug description.

$ printenv
COLORFGBG=15;0
COLORTERM=truecolor
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DEBUGINFOD_URLS=https://debuginfod.archlinux.org
DESKTOP_SESSION=plasma
DISPLAY=:0
GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/guissou/.gtkrc-2.0:/home/guissou/.config/gtkrc-2.0
GTK_MODULES=canberra-gtk-module
GTK_RC_FILES=/etc/gtk/gtkrc:/home/guissou/.gtkrc:/home/guissou/.config/gtkrc
HOME=/home/guissou
JOURNAL_STREAM=8:58386
KDE_APPLICATIONS_AS_SCOPE=1
KDE_FULL_SESSION=true
KDE_SESSION_UID=1000
KDE_SESSION_VERSION=5
KONSOLE_DBUS_SERVICE=:1.123
KONSOLE_DBUS_SESSION=/Sessions/1
KONSOLE_VERSION=221201
LANG=en_US.UTF-8
LANGUAGE=
LC_COLLATE=C
LC_MEASUREMENT=en_US.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_MONETARY=en_US.UTF-8
LC_NUMERIC=en_US.UTF-8
LC_TIME=fr_CH.UTF-8
MANAGERPID=2798
MOTD_SHOWN=pam
PAM_KWALLET5_LOGIN=/run/user/1000/kwallet5.socket
PATH=RETRACTED
PROFILEHOME=
QT_AUTO_SCREEN_SCALE_FACTOR=0
QT_SCREEN_SCALE_FACTORS=eDP1=1;DP1=1;DP2=1;DP3=1;DP4=1;HDMI1=1;VIRTUAL1=1;DP-1-0=1;DP-1-1=1;DP-1-2=1;DP-1-3=1;HDMI-1-0=1;
SESSION_MANAGER=local/guinux:@/tmp/.ICE-unix/5110,unix/guinux:/tmp/.ICE-unix/5110
SHELL=/usr/bin/zsh
SHELL_SESSION_ID=0bf0d95d69234010b90f2a5ab0d0b582
SHLVL=1
SYSTEMD_EXEC_PID=5110
TERM=xterm-256color
USER=guissou
WINDOWID=56623117
XAUTHORITY=/home/guissou/.Xauthority
XCURSOR_SIZE=36
XCURSOR_THEME=breeze_cursors
XDG_CONFIG_DIRS=/home/guissou/.config/kdedefaults:/etc/xdg
XDG_CURRENT_DESKTOP=KDE
XDG_DATA_DIRS=/home/guissou/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=KDE
XDG_SESSION_ID=10
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session7
XDG_SESSION_TYPE=x11
XDG_VTNR=1
_=/usr/bin/printenv
PAGER=less
LESS=-R

What seems to happen when I press first "^" and then "e" is:
1. KeyRelease "^" (?)
2. KeyPress "^"
3. KeyRelease "^"
4. KeyRelease "e" (?)
5. KeyPress "e"
6. KeyPress "ê"
7. KeyRelease "e"

So there is a KeyPress event for "ê", but it seems that the "e" event is stronger (or "ê" is ignored). Moreover, the output "e" is produced right after the "ê" KeyPress event, which is weird.

$ xev -event keyboard -id 0x360000d
KeyRelease event, serial 21, synthetic NO, window 0x360000d,
    root 0x9c5, subw 0x0, time 17614779, (415,1492), root:(415,1521),
    state 0x0, keycode 21 (keysym 0xfe52, dead_circumflex), same_screen YES,
    XLookupString gives 1 bytes: (5e) "^"
    XFilterEvent returns: False

KeyPress event, serial 21, synthetic NO, window 0x360000d,
    root 0x9c5, subw 0x0, time 17614779, (415,1492), root:(415,1521),
    state 0x0, keycode 21 (keysym 0xfe52, dead_circumflex), same_screen YES,
    XLookupString gives 1 bytes: (5e) "^"
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: True

KeyRelease event, serial 21, synthetic NO, window 0x360000d,
    root 0x9c5, subw 0x0, time 17614859, (415,1492), root:(415,1521),
    state 0x0, keycode 21 (keysym 0xfe52, dead_circumflex), same_screen YES,
    XLookupString gives 1 bytes: (5e) "^"
    XFilterEvent returns: False

KeyRelease event, serial 21, synthetic NO, window 0x360000d,
    root 0x9c5, subw 0x0, time 17615708, (415,1492), root:(415,1521),
    state 0x0, keycode 26 (keysym 0x65, e), same_screen YES,
    XLookupString gives 1 bytes: (65) "e"
    XFilterEvent returns: False

KeyPress event, serial 21, synthetic NO, window 0x360000d,
    root 0x9c5, subw 0x0, time 17615708, (415,1492), root:(415,1521),
    state 0x0, keycode 26 (keysym 0x65, e), same_screen YES,
    XLookupString gives 1 bytes: (65) "e"
    XmbLookupString gives 1 bytes: (65) "e"
    XFilterEvent returns: True

KeyPress event, serial 21, synthetic NO, window 0x360000d,
    root 0x9c5, subw 0x0, time 17615708, (415,1492), root:(415,1521),
    state 0x0, keycode 0 (keysym 0xea, ecircumflex), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 2 bytes: (c3 aa) "ê"
    XFilterEvent returns: False
e
KeyRelease event, serial 21, synthetic NO, window 0x360000d,
    root 0x9c5, subw 0x0, time 17615781, (415,1492), root:(415,1521),
    state 0x0, keycode 26 (keysym 0x65, e), same_screen YES,
    XLookupString gives 1 bytes: (65) "e"
    XFilterEvent returns: False

Offline

#12 2023-01-25 15:13:29

seth
Member
Registered: 2012-09-03
Posts: 35,121

Re: [SOLVED] dead keys not working in KDE

Thanks for the pointer to the bug description.

Unfortunately no IM defined on your system sad

The events there are normal (for this xev condition) and what you'd expect - except they should result in "ê", not "e" being printed.
Since it doesn't happen in openbox and plasma is known for shenanigans:
https://wiki.archlinux.org/title/KDE#Pl … e_settings

But this isn't an xkb issue, it's some implementation detail in the client.

Offline

#13 2023-01-25 16:25:10

guissou
Member
Registered: 2022-02-25
Posts: 16

Re: [SOLVED] dead keys not working in KDE

What does IM stand for?

Does it mean that I am not affected by this bug?

Thank you very much for your help. I will find an alternative to Konsole.

Offline

#14 2023-01-25 16:44:44

seth
Member
Registered: 2012-09-03
Posts: 35,121

Re: [SOLVED] dead keys not working in KDE

* https://wiki.archlinux.org/title/Input_method
* Unlikely
* It's not only konsole, is it? Pretty much all KDE applications, maybe all Qt are affected?
Did you remove plasmas locale config?

Offline

#15 2023-01-27 07:33:47

guissou
Member
Registered: 2022-02-25
Posts: 16

Re: [SOLVED] dead keys not working in KDE

Removing the Plasma locale config solved my problem!

$ rm ~/.config/plasma-localerc

Thank you very much for your precious help!

Offline

Board footer

Powered by FluxBB