You are not logged in.

#1 2022-12-20 12:57:41

cone_man
Member
Registered: 2022-12-20
Posts: 14

[SOLVED] Unable to write diacritics

Hi there.
When I try to type diacritics on the terminal emulator for example I don't get anything, but when I use other applications like Firefox they work correctly
If I exit the desktop environment and try to use them in the console they work before I login, after I login they don't work anymore.
I have also compared the following command/files between this system and another where the diacritics work correctly, and they are mostly the same:

setxkbmap -print -verbose 10
/etc/X11/xorg.conf.d/00-keyboard.conf

I'm using kde-plasma with x11, any ideas on possible cause/fixes.
Thank you in advance.

Last edited by cone_man (2022-12-20 16:06:50)

Offline

#2 2022-12-20 13:16:14

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,418

Re: [SOLVED] Unable to write diacritics

they are mostly the same

setxkbmap -print -query

type diacritics on the terminal emulator for example I don't get anything, but when I use other applications like Firefox they work

Which "terminal emulator" exactly (konsole? xterm?) and how do you enter the diacritics (dedicated key, dead key, xcompose, some IM)?

Offline

#3 2022-12-20 13:26:59

cone_man
Member
Registered: 2022-12-20
Posts: 14

Re: [SOLVED] Unable to write diacritics

I'm using konsole but is mostly system wide.
I enter the diacritics with a dedicated key

Examples of programs where they don't work work:
konsole and all kde-applications, qbittorrent, keepassxc
Examples of programs where they work work:
Firefox, vscodium

Offline

#4 2022-12-20 13:45:59

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,418

Re: [SOLVED] Unable to write diacritics

seth wrote:
setxkbmap -print -query

The implication was to post the output.

Offline

#5 2022-12-20 13:53:51

cone_man
Member
Registered: 2022-12-20
Posts: 14

Re: [SOLVED] Unable to write diacritics

sorry, updated main post btw

xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+pt+inet(evdev)"     };
        xkb_geometry  { include "pc(pc105)"     };
};
rules:      evdev
model:      pc105
layout:     pt

Offline

#6 2022-12-20 14:08:29

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,418

Re: [SOLVED] Unable to write diacritics

THe default pt layout looks like it uses deadkeys for everything but the ccedilla ç/Ç ?
Is that the (only) concerned key?

Offline

#7 2022-12-20 14:18:10

cone_man
Member
Registered: 2022-12-20
Posts: 14

Re: [SOLVED] Unable to write diacritics

The 'ç' as a dedicated key and works fine, the problems are the 'à', 'á', 'â', 'ã' or '´', '`', '^', '~'. I cannot type the characters by itself separately or composed with another. There is another layout that has 'no dead keys' in the name that allows me to type '´', '`', '^', '~', but if I try to compose the character it gives '´a', '`a', '^a', '~a' .

Offline

#8 2022-12-20 14:58:50

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,418

Re: [SOLVED] Unable to write diacritics

Those are "dead keys" (meaning they don't operate by themselves but just impact the next input)
Otoh, "no dead keys" means that - "`" immediately triggers "`" instead of waiting for the next key (so those are behaving as expected)
W/ the deadkey layout (the one you've been trying to use), run

xev -event keyboard

press "`" and post the resulting output.


Also, because of the pattern and as a sanity check:

printenv | grep -iE 'im|mod' # https://wiki.archlinux.org/title/Input_method
loginctl session-status

Offline

#9 2022-12-20 15:13:45

cone_man
Member
Registered: 2022-12-20
Posts: 14

Re: [SOLVED] Unable to write diacritics

xev -event keyboard
Outer window is 0x3a00001, inner window is 0x3a00002

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 0x3a00001,
    root 0x71b, subw 0x0, time 4283726, (-791,317), root:(80,791),
    state 0x10, keycode 36 (keysym 0xff0d, Return), same_screen YES,
"   XLookupString gives 1 bytes: (0d) "
    XFilterEvent returns: False

KeyPress event, serial 28, synthetic NO, window 0x3a00001,
    root 0x71b, subw 0x0, time 4284891, (-791,317), root:(80,791),
    state 0x10, keycode 35 (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 0x3a00001,
    root 0x71b, subw 0x0, time 4284952, (-791,317), root:(80,791),
    state 0x10, keycode 35 (keysym 0xfe51, dead_acute), same_screen YES,
    XLookupString gives 2 bytes: (c2 b4) "´"
    XFilterEvent returns: False
printenv | grep -iE 'im|mod' # https://wiki.archlinux.org/title/Input_method
GTK_MODULES=canberra-gtk-module
XDG_RUNTIME_DIR=/run/user/1000
loginctl session-status
2 - username (1000)
           Since: Tue 2022-12-20 13:55:37 WET; 1h 14min ago
          Leader: 530 (sddm-helper)
            Seat: seat0; vc1
         Display: :0
         Service: sddm; type x11; class user
         Desktop: KDE
           State: active
            Unit: session-2.scope
                  ├─530 /usr/lib/sddm/sddm-helper --socket /tmp/sddm-authfaf92d71-0f3c-4655-9350-1315622e615d>
                  ├─543 /usr/bin/kwalletd5 --pam-login 6 8
                  └─544 /usr/bin/startplasma-x11

Dec 20 13:55:37 arch systemd[1]: Started Session 2 of User username.
Dec 20 13:55:37 arch sddm-helper[542]: pam_kwallet5: final socket path: /run/user/1000/kwallet5.socket
Dec 20 13:55:37 arch sddm-helper[544]: Adding cookie to "/home/username/.Xauthority"
Dec 20 13:55:37 arch ksplashqml[555]: file:///home/username/.local/share/plasma/look-and-feel/BH_AccretionDisk_>
Dec 20 13:55:37 arch ksplashqml[555]: file:///home/username/.local/share/plasma/look-and-feel/BH_AccretionDisk_>
...skipping...
2 - username (1000)
           Since: Tue 2022-12-20 13:55:37 WET; 1h 14min ago
          Leader: 530 (sddm-helper)
            Seat: seat0; vc1
         Display: :0
         Service: sddm; type x11; class user
         Desktop: KDE
           State: active
            Unit: session-2.scope
                  ├─530 /usr/lib/sddm/sddm-helper --socket /tmp/sddm-authfaf92d71-0f3c-4655-9350-1315622e615d>
                  ├─543 /usr/bin/kwalletd5 --pam-login 6 8
                  └─544 /usr/bin/startplasma-x11

Dec 20 13:55:37 arch systemd[1]: Started Session 2 of User username.
Dec 20 13:55:37 arch sddm-helper[542]: pam_kwallet5: final socket path: /run/user/1000/kwallet5.socket
Dec 20 13:55:37 arch sddm-helper[544]: Adding cookie to "/home/username/.Xauthority"
Dec 20 13:55:37 arch ksplashqml[555]: file:///home/username/.local/share/plasma/look-and-feel/BH_AccretionDisk_>
Dec 20 13:55:37 arch ksplashqml[555]: file:///home/username/.local/share/plasma/look-and-feel/BH_AccretionDisk_>

Last edited by cone_man (2022-12-20 15:14:07)

Offline

#10 2022-12-20 15:22:24

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,418

Re: [SOLVED] Unable to write diacritics

dead_acute is triggered, so there's everything fine w/ the keyboard config.
It is also relevant, because you're not on a wayland session.

Thest the behavior of

QT_IM_MODULE=xim kwrite

Offline

#11 2022-12-20 15:30:08

cone_man
Member
Registered: 2022-12-20
Posts: 14

Re: [SOLVED] Unable to write diacritics

No changes

kf.sonnet.core: Sonnet: No speller backends available!
kf.sonnet.core: No language dictionaries for the language: "en_US"
kf.sonnet.core: No language dictionaries for the language: "en_US"
kf.sonnet.core: No language dictionaries for the language: "en_US"
kf.sonnet.core: No language dictionaries for the language: "en_US"
kf.sonnet.core: No language dictionaries for the language: "en_US"
qt.xkb.compose: failed to create compose table

Last edited by cone_man (2022-12-20 15:30:59)

Offline

#12 2022-12-20 15:41:04

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,418

Re: [SOLVED] Unable to write diacritics

localectl
locale
locale -a

Offline

#13 2022-12-20 15:44:06

cone_man
Member
Registered: 2022-12-20
Posts: 14

Re: [SOLVED] Unable to write diacritics

[username@arch ~]$ localectl
System Locale: LANG=en_US.UTF8
    VC Keymap: pt-latin1
   X11 Layout: pt
[username@arch ~]$ locale
LANG=en_US.UTF8
LC_CTYPE="en_US.UTF8"
LC_NUMERIC="en_US.UTF8"
LC_TIME="en_US.UTF8"
LC_COLLATE="en_US.UTF8"
LC_MONETARY="en_US.UTF8"
LC_MESSAGES="en_US.UTF8"
LC_PAPER="en_US.UTF8"
LC_NAME="en_US.UTF8"
LC_ADDRESS="en_US.UTF8"
LC_TELEPHONE="en_US.UTF8"
LC_MEASUREMENT="en_US.UTF8"
LC_IDENTIFICATION="en_US.UTF8"
LC_ALL=
[username@arch ~]$ 
locale -a
C
C.UTF-8
en_US.utf8
POSIX
pt_PT.utf8

Offline

#14 2022-12-20 15:47:44

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,418

Re: [SOLVED] Unable to write diacritics

The locale is incorrect (and english)

LC_ALL=pt_PT.UTF-8 kwrite

https://bbs.archlinux.org/viewtopic.php?id=265821

Offline

#15 2022-12-20 15:51:11

cone_man
Member
Registered: 2022-12-20
Posts: 14

Re: [SOLVED] Unable to write diacritics

That fixed it.
Edit:
Got it working system wide.
Thank you for all the help.

Last edited by cone_man (2022-12-20 16:06:29)

Offline

#16 2022-12-20 16:06:50

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,418

Re: [SOLVED] Unable to write diacritics

Edit: crosstalk wink
You probably figured that LC_ALL=en_US.UTF-8 works as well.
The wrong locale is configured in /etc/locale.conf, the dash is important, so fix that and then 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.

Last edited by seth (2022-12-20 16:07:45)

Offline

Board footer

Powered by FluxBB