Comments
If this article inspires you, feel free to send me an email in response.
How to enable the Wezterm terminal emulator with proper support for deadkeys, so that alternative keyboard layouts like Lafayette or ErgoL work correctly with it.
I’m quite a big fan of the Wezterm terminal emulator: it’s written in Rust, it’s super fast because it’s making use of GPU acceleration, it supports terminal multiplexing, and it’s configurable with Lua, a language that mistakenly uses 1 as the start index for arrays, but I digress.
There was one issue that I kept running into, as a user of the Qwerty-Lafayette keyboard layout. Whenever I pressed the dead key in Wezterm, it would render it (i.e. a semicolon) before rendering the composed key I really wanted to type.
This bug has been described for almost two years on the Github repository. It seems the activity on the project has lowered a bit recently, and I can only imagine why, and have empathy for the maintainer. Nevertheless, there’s also been a pull request that wasn’t linked (until I commented in both the issue and PR this morning), and that happened to fix the issue: here. It turns out that, while this PR claims to fix the issue when running on an X server, it happens to also fix it when running on a Wayland server (like Yours Truly™), because the code for Wayland calls into that of X, in wezterm’s source code.
I’ve uninstalled the system-wide wezterm binary, and installed it from source instead:
git clone https://github.com/wezterm/wezterm
cd wezterm
# go to the right branch, using github's gh utility
gh pr checkout 4991
# safe to rebase onto `main`, to get all its fresh goodness
git rebase main
# install both the CLI tool wezterm, that spawns the GUI binary, when called with no parameters
cargo install --path ./wezterm
cargo install --path ./wezterm-gui
# add the cargo bin directory to my path, as it wasn't, on this machine
fish_add_path ~/.cargo/bin
# ??? fun and profits
wezterm
And with this, my wezterm terminal now correctly handles dead keys, making it possible to write blog posts in French from neovim for my 100 days to offload 2026 challenge 🥳
I’ve hesitated to even package an AUR package for ArchLinux users, but I really do hope that the activity on the pull request may lead to a review and a new release Some Day 😌
If this article inspires you, feel free to send me an email in response.