Make ' + c produce ç (and ' + C produce Ç) in Chromium on native
Wayland — without an input method framework (no fcitx5, no ibus), keeping the
native Wayland backend.
Targeted at Arch Linux / Arch Linux ARM + Wayland compositors (Hyprland, Sway, river, …) using the US-International layout, but the technique works anywhere.
On the US-International layout, ' is a dead key (dead_acute). Pressing
' + c should be configurable to produce the cedilla ç, and on most apps it
is — via ~/.XCompose / the system Compose table.
But Chromium on native Wayland ignores ~/.XCompose and XCOMPOSEFILE
entirely. Instead of libxkbcommon, it uses ChromeOS' ui::CharacterComposer
with a compose table compiled into the binary. That table hardcodes
dead_acute + c → ć (LATIN SMALL LETTER C WITH ACUTE, U+0107), so Portuguese /
French / Catalan / Turkish users get ć instead of ç.
This is a known, still-open Chromium bug: crbug 40272818 — Custom compose key sequences (.XCompose) do not work on Chrome + Wayland.
The usual "solutions" each cost you something:
| Workaround | Keeps '+c→ç |
Native Wayland | No IME |
|---|---|---|---|
Run Chromium under X11 (--ozone-platform=x11) |
✅ | ❌ | ✅ |
fcitx5 / ibus + --enable-wayland-ime |
✅ | ✅ | ❌ |
| This patch | ✅ | ✅ | ✅ |
The hardcoded compose table stores entries as [input uint16 LE][output uint16 LE]. The acute-accent row looks like a→á, c→ć, e→é, …. We change only the
output of c/C:
c (0x0063) -> ć (0x0107): 63 00 07 01 => 63 00 e7 00 (ç U+00E7)
C (0x0043) -> Ć (0x0106): 43 00 06 01 => 43 00 c7 00 (Ç U+00C7)
The patch matches by byte pattern, not by offset, so it keeps working across
Chromium releases (3 copies of the table exist in the binary; all are patched).
Nothing else is touched — every other accent ('+a→á, '+e→é, …) is unchanged.
Heads up: after this, you can no longer type
ć/Ćvia' + cin Chromium. If you need those, type them another way.
git clone https://github.com/lcassa/chromium-wayland-cedilla-fix.git
cd chromium-wayland-cedilla-fix
sudo ./install.shThis:
- installs
chromium-cedilla-patch.pyto/usr/local/bin/, - installs a pacman hook (
/etc/pacman.d/hooks/) that re-applies the patch automatically after everychromiumupgrade, - applies the patch once.
Then restart Chromium completely and test ' + c → ç.
If your Chromium binary is not at /usr/lib/chromium/chromium, pass the path:
sudo ./install.sh /path/to/chromiumsudo ./uninstall.shRestores the pristine binary from the .orig backup and removes the hook/script.
- This patches a system binary. It is unofficial. A pristine
.origbackup is made before the first patch, and a timestamped.bak-*on every run. - If a future Chromium version changes the compose-table layout, the pattern won't match — the script then does nothing and warns (it never corrupts the binary). If that happens, please open an issue.
- The pacman hook keeps it applied across upgrades; if you install Chromium via Flatpak/Snap instead, you'll need to adapt the path and re-apply mechanism.
MIT — see LICENSE.