the compose key

2025-06-10

On a daily basis I use some languages that require non-ascii characters and for the longest time on linux/wayland I’ve struggled to find ways to use these characters.

The Germans characters I’ve just abbreviated:

For the Spanish ones removed all the extras:

And for the Portuguese just the same:

Perhaps a bit unorthodox or bad towards the language, but my way to go would be having a buffer with those in /tmp/ or looking them up on wikipedia and copying them whenever needed.

But recently I was a bit tired of it and to make new Portuguese flashcards I didn’t want to go use a mac with nice diacritics on macos, so I figured out it may be worth the time to look into how to use a compose key for hyprland.

Turns out it’s as easy as it could be:

  input = {
    kb_options = compose:ralt;
  };

(Semicolons because hyprland is defined in nix, not its own config.)

Since then I have (alt-gr := compose):

For obvious reasons this makes writing these characters much easier, but on telling a friend about that she shared another good way to do it without key.

Vim’s :dig.

An nix inbuilt way of using special characters. Now I don’t need it anymore because I have the special symbols implemented on a deeper level but would I have known about that earlier I’ve probably not needed it as everything that is longer than two sentences is already written in nvim either way.

But I do recommend giving it a look, it has a huge variety of other alphabets too, most notably for the daily use is the Greek to maybe refer to mathematics, a theorem or a such.

Can recommend, have fun.