You are not logged in.

#1 2024-11-24 21:10:59

Limones
Member
From: Brasília, Brazil
Registered: 2024-02-13
Posts: 8

[SOLVED] Unable to type "ç" or "Ç" using ' + c on Wayland (Hyprland)

Hi! smile

My keyboard has the US layout, and I have been using Xorg (bspwm) with the "US intl. with dead key" layout happily and perfectly. I could type normally in portuguese, including all the accents (eg. café, avô, àqueles, feijão) and the cedilla (eg. linguiça) composing the letters with ", ', ` and ~ plus the base letter (a, e, c...).
However, I recently moved to Wayland (Hyprland) due to the progress between Wayland and NVidia, and I'm facing some issues with composing. I can type the normal accents (á, ã, â, à) composing like I said before, but I can't use the cedilla (ç / Ç) the way I did before (' + c or C). I know I can use the AltGr (right alt) + , to insert the cedilla, and it would be ok if portuguese didn't use the cedilla often, but it does, and using the AltGr method is terrible for typing.
When searching for solutions, every single one I found was for X11, using ~/.XCompose or adding "GTK_IM_MODULE=cedilla" and "QT_IM_MODULE=cedilla" to /etc/environment, but nothing worked on my compositor.
The workaround I found for Chromium was to use it under XWayland by setting the ozone-platform-hint flag to X11 (that's how I've been typing the cedilla on this topic tongue). I think this indicates there is a problem on the Wayland side of things, as a X11 app composes the cedilla just fine. The same behaviour appears on Discord (X11) and Vesktop (Wayland), with the cedilla working on the former and not on the latter.

Is there a way to fix this?

System info:
- Arch Linux with 6.11.9-arch1-1 kernel

$ uname -r
6.11.9-arch1-1

- LANG=pt_BR.UTF-8

$ cat /etc/locale.conf
LANG=pt_BR.UTF-8

- Keyboard segment of ~/.config/hypr/hyprland.conf

input {
    #...
    
    kb_layout = us,us
    kb_variant = ,intl
    kb_model =
    kb_options =
    kb_rules =

    numlock_by_default = true

    #...
}

- Hyprland started from the TTY with no display manager using

$ Hyprland

- Switching to us-intl keyboard with

$ hyprctl switchxkbmap current 1

- Optimus laptop managed by envycontrol with an Intel CPU and NVidia GPU (idk why this would be important, but it caused me enough problems to make me include this information lol).

Thanks in advance for anything! smile

Last edited by Limones (2024-12-01 22:39:53)

Offline

#2 2024-11-28 18:44:40

retrozinndev
Member
From: Rio de Janeiro, Brasil
Registered: 2024-01-31
Posts: 1
Website

Re: [SOLVED] Unable to type "ç" or "Ç" using ' + c on Wayland (Hyprland)

I was having the same issue, but after specifying the KEYMAP variable to "us" in "/etc/vconsole.conf", the problem was solved.

/etc/vconsole.conf:

KEYMAP=us

Last edited by retrozinndev (2024-11-28 18:45:39)

Offline

#3 2024-11-28 19:42:55

seth
Member
Registered: 2012-09-03
Posts: 59,908

Re: [SOLVED] Unable to type "ç" or "Ç" using ' + c on Wayland (Hyprland)

using ~/.XComposite or

"~/.XCompose"
What does that file look like for you?

grep ccedilla /usr/share/X11/locale/en_US.UTF-8/Compose /usr/share/X11/locale/pt_BR.UTF-8/Compose

Since there recently was a locale bug in gtk that apparently only affected pt_BR.UTF-8, do you get this behavior w/ Qt clients as well?

@retrozinndev, that key should™ only affect the keyboard layout of the console which relates neither to dead key handling, nor Hyprland?

Online

#4 2024-11-29 00:16:56

Limones
Member
From: Brasília, Brazil
Registered: 2024-02-13
Posts: 8

Re: [SOLVED] Unable to type "ç" or "Ç" using ' + c on Wayland (Hyprland)

"~/.XCompose"

Oops, typo, thanks for the correction.

$ cat ~/.XCompose

# UTF-8 (Unicode) compose sequences
#
# Originally modified for Brazilian Portuguese
#   by Gustavo Noronha Silva <kov@debian.org>.
# Transformed to an include file plus some overrides
#   by Benno Schulenberg <bensberg@justemail.net>
# Use the sequences from en_US.UTF-8 as the basis:
include "/usr/share/X11/locale/en_US.UTF-8/Compose"
# Two nice additions -- maybe add to en_US.UTF8?
<Multi_key> <quotedbl> <backslash> 	: "〝" U301d	# REVERSED DOUBLE PRIME QUOTATION MARK
<Multi_key> <quotedbl> <slash>  	: "〞" U301e	# DOUBLE PRIME QUOTATION MARK
#  Overriding C with acute:
<dead_acute> <C> 			: "Ç" Ccedilla	# LATIN CAPITAL LETTER C WITH CEDILLA
<dead_acute> <c> 			: "ç" ccedilla	# LATIN SMALL LETTER C WITH CEDILLA
#  Overriding E with ogonek:
<Multi_key> <comma> <E> 		: "Ȩ" U0228	# LATIN CAPITAL LETTER E WITH CEDILLA
<Multi_key> <comma> <e> 		: "ȩ" U0229	# LATIN SMALL LETTER E WITH CEDILLA
#  Overriding U with ogonek:
<Multi_key> <U> <comma> <E> 		: "Ḝ" U1E1C	# LATIN CAPITAL LETTER E WITH CEDILLA AND BREVE
<Multi_key> <U> <comma> <e> 		: "ḝ" U1E1D	# LATIN SMALL LETTER E WITH CEDILLA AND BREVE
# These two should probably go back into en_US.UTF8;
# they were most likely mistakenly dropped in June 2006:
<Multi_key> <acute> <U03D2> 		: "ϓ" U03D3	# GREEK UPSILON WITH ACUTE AND HOOK SYMBOL
<Multi_key> <apostrophe> <U03D2> 	: "ϓ" U03D3	# GREEK UPSILON WITH ACUTE AND HOOK SYMBOL

$ grep ccedilla /usr/share/X11/locale/en_US.UTF-8/Compose /usr/share/X11/locale/pt_BR.UTF-8/Compose

/usr/share/X11/locale/en_US.UTF-8/Compose:<dead_cedilla> <c>			: "ç"	ccedilla # LATIN SMALL LETTER C WITH CEDILLA
/usr/share/X11/locale/en_US.UTF-8/Compose:<Multi_key> <comma> <c>			: "ç"	ccedilla # LATIN SMALL LETTER C WITH CEDILLA
/usr/share/X11/locale/en_US.UTF-8/Compose:<Multi_key> <c> <comma>			: "ç"	ccedilla # LATIN SMALL LETTER C WITH CEDILLA
/usr/share/X11/locale/en_US.UTF-8/Compose:<Multi_key> <cedilla> <c>		: "ç"	ccedilla # LATIN SMALL LETTER C WITH CEDILLA
/usr/share/X11/locale/en_US.UTF-8/Compose:<dead_acute> <ccedilla>				: "ḉ"	U1E09 # LATIN SMALL LETTER C WITH CEDILLA AND ACUTE
/usr/share/X11/locale/en_US.UTF-8/Compose:<Multi_key> <acute> <ccedilla>			: "ḉ"	U1E09 # LATIN SMALL LETTER C WITH CEDILLA AND ACUTE
/usr/share/X11/locale/en_US.UTF-8/Compose:<Multi_key> <apostrophe> <ccedilla>		: "ḉ"	U1E09 # LATIN SMALL LETTER C WITH CEDILLA AND ACUTE
/usr/share/X11/locale/en_US.UTF-8/Compose:<dead_currency> <ccedilla>		: "₵"	U20B5 # CEDI SIGN
/usr/share/X11/locale/pt_BR.UTF-8/Compose:<dead_acute> <c> 			: "ç" ccedilla	# LATIN SMALL LETTER C WITH CEDILLA

do you get this behavior w/ Qt clients as well?

No, I don't.
I don't really use Qt applications, so I installed kcharselect and tested on it. Cedilla working fine.

I was having the same issue, but after specifying the KEYMAP variable to "us" in "/etc/vconsole.conf", the problem was solved.

I just tried doing it, nothing changed. (Testing on Obsidian.md.)

Offline

#5 2024-11-29 07:37:29

seth
Member
Registered: 2012-09-03
Posts: 59,908

Re: [SOLVED] Unable to type "ç" or "Ç" using ' + c on Wayland (Hyprland)

include "/usr/share/X11/locale/en_US.UTF-8/Compose"
…
#  Overriding C with acute:
<dead_acute> <C> 			: "Ç" Ccedilla	# LATIN CAPITAL LETTER C WITH CEDILLA
<dead_acute> <c> 			: "ç" ccedilla	# LATIN SMALL LETTER C WITH CEDILLA

Your .XCompose is a custom riff on the US version

strace gtk3-demo |& grep Compose # |& is a bashism, will also work on zsh
GTK_IM_MODULE=xim strace gtk3-demo |& grep Compose
printenv

Edit: that's for gtk on wayland - if you don't have gtk3-demo intalled, you can use any other client that bugs you (use a simple one, strace slows down things, you don't want to start chromium this way wink

Last edited by seth (2024-11-29 07:38:48)

Online

#6 2024-11-30 15:44:52

Limones
Member
From: Brasília, Brazil
Registered: 2024-02-13
Posts: 8

Re: [SOLVED] Unable to type "ç" or "Ç" using ' + c on Wayland (Hyprland)

strace gtk3-demo |& grep Compose

No output.

GTK_IM_MODULE=xim strace gtk3-demo |& grep Compose

No output either.

I tested the same thing with Obsidian, Chromium (yep, did it anyway tongue), still no output.

HOWEVER, the cedilla was working fine on gtk, with and without GTK_IM_MODULE=cedilla / GTK_IM_MODULE=xim.
Then I realized that Chromium, Vesktop and Obsidian are all Electron apps... Guess the problem is within Chromium and Electron (I just learnt that Electron embeds Chromium... wow).

The only app that gave me an output was kcharselect (Qt), with the cedilla working on it (QT_IM_MODULE=cedilla set and unset).

openat(AT_FDCWD, "/home/limones/.config/XCompose", O_RDONLY) = -1 ENOENT (Arquivo ou diretório inexistente)
openat(AT_FDCWD, "/home/limones/.XCompose", O_RDONLY) = 13
openat(AT_FDCWD, "/usr/share/X11/locale/en_US.UTF-8/Compose", O_RDONLY) = 22

Offline

#7 2024-11-30 18:39:19

seth
Member
Registered: 2012-09-03
Posts: 59,908

Re: [SOLVED] Unable to type "ç" or "Ç" using ' + c on Wayland (Hyprland)

QT_IM_MODULE=cedilla

No idea where you got this, but I'm not aware of a "cedilla" IM, so it's likely nonsense.

But gtk/wayland indeed doesn't open any XCompose file, so I'm not sure how it picks up your custom one :\


As for eletron:
https://wiki.archlinux.org/title/Chromi … nd_support - try "--gtk-version=4"
And yes, electron the complete chromuim browser engine, you're essentially runnig bloated web-apps.

Online

#8 2024-11-30 19:29:30

Limones
Member
From: Brasília, Brazil
Registered: 2024-02-13
Posts: 8

Re: [SOLVED] Unable to type "ç" or "Ç" using ' + c on Wayland (Hyprland)

try "--gtk-version=4"

It simply stopped composing on Chromium. With or without --ozone-platform=wayland and --ozone-platform-hint=auto, couldn't even type the normal accents, it went directly to ' or ". No effect on other clients, tested Vesktop (Flatpak) and Obsidian.

On Chromium, tried --enable-wayland-ime and --wayland-text-input-version=3, but no success.

I'm not aware of a "cedilla" IM

It probably is nonsense, it came from a response on a random site, I don't even remember where it came from. Just a desperate try lol.

Offline

#9 2024-11-30 20:21:04

seth
Member
Registered: 2012-09-03
Posts: 59,908

Re: [SOLVED] Unable to type "ç" or "Ç" using ' + c on Wayland (Hyprland)

Let's see which IMM gtk3 opens for you on wayland:

strace gtk3-demo |& grep imm

Online

#10 2024-11-30 21:13:23

Limones
Member
From: Brasília, Brazil
Registered: 2024-02-13
Posts: 8

Re: [SOLVED] Unable to type "ç" or "Ç" using ' + c on Wayland (Hyprland)

access("../../modules/input/immodules.cache", F_OK) = -1 ENOENT (Arquivo ou diretório inexistente)
openat(AT_FDCWD, "/usr/lib/gtk-3.0/3.0.0/immodules.cache", O_RDONLY) = 13
newfstatat(AT_FDCWD, "/usr/lib/gtk-3.0/3.0.0/immodules/im-cedilla.so", {st_mode=S_IFREG|0755, st_size=14376, ...}, 0) = 0
openat(AT_FDCWD, "/usr/lib/gtk-3.0/3.0.0/immodules/im-cedilla.so", O_RDONLY|O_CLOEXEC) = 13

That's the output.
The cedilla worked on gtk3.

Offline

#11 2024-11-30 21:15:45

seth
Member
Registered: 2012-09-03
Posts: 59,908

Re: [SOLVED] Unable to type "ç" or "Ç" using ' + c on Wayland (Hyprland)

I stand corrected, there's an im-cedilla in gtk and you're using it.
But chromium probably won't.

Have you tried the behavior w/ ibus?

Online

#12 2024-12-01 01:44:21

Limones
Member
From: Brasília, Brazil
Registered: 2024-02-13
Posts: 8

Re: [SOLVED] Unable to type "ç" or "Ç" using ' + c on Wayland (Hyprland)

I just spent the last hour messing around with ibus to see if something works. The best I could was being able to type emojis in some apps (Chromium NOT included) and almost frying my brain trying to understand what I was doing (if you can't tell, I just discovered what an IMF is).

I guess IBus was successfuly installed, but it was hard dealing with it as I don't have a system tray (nor a bar). I got really confused with how it was dealing (or not) with the input method config from Hyprland, as ibus-setup gave me an option to add input methods, but the applications seemed to be following Hyprland's config, even when IBus was configured to not use the system's layout...?

As if it wasn't enough, every time I started Hyprland (with exec-once=ibus-daemon -rxRd), I got a notification from IBus saying

IBus should be called from the desktop session in Wayland. For KDE, you can launch 'systemsettings5' utility and go to "Input Devices" -> "Virtual Keyboard" section and select "IBus Wayland" icon and click "Apply" button to configure IBus in Wayland. For other desktop sessions, you can copy the 'Exec=' line in org.freedesktop.IBus.Panel.Wayland.Gtk3.desktop file to a configuration file of the session. Please refer each document about the "Wayland input method" configuration. Before you configure the "Wayland input method", you should make sure that QT_IM_MODULE and GTK_IM_MODULE environment variables are unset in the desktop session.

P.S: The Exec= line it talks about is /usr/lib/ibus/ibus-ui-gtk3 --enable-wayland-im --exec-daemon --daemon-args "--xim --panel disable", and it throws a "No input_method global" error, a "Trace/breakpoint trap (core dumped)" and dies when I execute it.

P.S 2.0: No, the cedilla didn't work.

EDIT: Reverting /etc/environment to the im module cedilla of qt and gtk instead of ibus and removing it from autostart for now as it is just another daemon I don't need nor works as I thought it would bloating the system. If there is anything I can do with it, it is already installed, only needing the setup.

Last edited by Limones (2024-12-01 01:46:32)

Offline

#13 2024-12-01 07:08:27

seth
Member
Registered: 2012-09-03
Posts: 59,908

Re: [SOLVED] Unable to type "ç" or "Ç" using ' + c on Wayland (Hyprland)

So, just tried, your local ~/.XCompose is likely irrelevant (to gtk/wayland) since "GTK_IM_MODULE=cedilla gtk3-demo" alone actually results in the desired '+c behavior and that also works.
Likewise I can confirm that chromium doesn't since chromium+wayland - unlike on X11 - doesn't open *any* gtk immodule.

=> you'll have to file a chromium bug.

Online

#14 2024-12-01 19:51:29

Limones
Member
From: Brasília, Brazil
Registered: 2024-02-13
Posts: 8

Re: [SOLVED] Unable to type "ç" or "Ç" using ' + c on Wayland (Hyprland)

=> you'll have to file a chromium bug.

Welp, that's it then. Thank you for everything! big_smile

I'll do some more messing around and then I'll file the bug. If I get it working, I'll post the solution.

Offline

#15 2024-12-01 22:39:23

Limones
Member
From: Brasília, Brazil
Registered: 2024-02-13
Posts: 8

Re: [SOLVED] Unable to type "ç" or "Ç" using ' + c on Wayland (Hyprland)

Dear seth, I've made it.

Currently typing this from Chromium, running natively on Wayland, being able to type the cedilla as I've been dreaming for over a thousand years!! (lol)

Jokes aside, I had to switch from IBus to Fcitx5. After the proper installation and configuration from the Arch Wiki and Fcitx5'wiki, it's working fine, even on the Electron apps. Basically, using the ozone platform flags to run Chromium/Electron on Wayland + --enable-wayland-ime with fcitx5 running in the background.

I haven't configured the hotkeys and everything yet, I got a notification about Hyprland not supporting Fcitx sending the keyboard layout that I don't know how to get rid of, and I don't understand how a compositor deals with another app managing the input, but the original problem is solved (if you know how I can make Fcitx happy, I'm accepting sugestions). Creating a script to manage Fcitx's keyboard layouts with keybinds configured on Hyprland is on my todo list to keep all keybinds centralized.

Thank you for introducing me to IMFs.

Marking as solved.

Offline

Board footer

Powered by FluxBB