Wayland/sway: XKB options take effect only in some applications

I’ve just setup Majaro Sway Edition and after a few days of configuring I’m quite happy.

There is on issue, where I could need some inspiration how to tackle it:

I need to type european special characters (like é and Ü etc.) and so far I been able to do so by setting XKB options compose:caps. I tried to set these xkb options in ~/.config/sway/config.d/50-keyboard.conf like this:

input * {
    xkb_options compose:caps
}

I think this is the recommended way to allow for special key composition in Wayland.

And it does work but only in some applications (firefox e.g.) and not in others (Telegram messenger, foot terminal emulator).

Interestingly, changing the keyboard layout completely e.g. to “de” get’s respected in all applications.

Does anyone have an idea what could be the problem or what to try?

Thanks!

I found this thread by googling.
I thought: “hey, that’s exactly what I’m experiencing” and was excited until I realized that I had started this thread in July xD

I still have this issue.
Compose works fine in firefox e.g. but does not work in the terminal emulator foot e.g.

Any ideas, what I could try to resolve this?

Thank you

I found the solution for this problem!

In my case the cause was, that I had en_AG set for all the locale environment variables!

There is no compose map for en_AG and some programs (like Telegram) would default to using no compose.
Other applications (like firefox) would use some default compose map.
That’s why it worked in some applications and didn’t in others.

All I had to do is to change all the values in /etc/locale.conf from en_AG to en_US.UTF-8
Now compose is working in all programs.

Here is the archwiki page about locale: https://wiki.archlinux.org/title/locale

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.

Good solution. One little finding I had in a similar situation was the EurKey keyboard layout:

You can enable it by setting the keyboard layout to ‘eu’. I love it!