💾 Archived View for envs.net › ~binarycat › gemlog › 2022-06-18_compose.gmi captured on 2023-04-26 at 13:48:15. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-07-16)
-=-=-=-=-=-=-
i used 9front as my primary os for a while, and one of the nicest things was being able to type charachters that aren't on my keyboard via the compose key.
as it turns out, X also has support for a compose key, you just have to enable it!
this command will temporarily bind caps lock to compose (put it in .xinitrc to make it permanent)
setxkbmap -option ctrl:nocaps -option compose:caps
most desktop environments also have an option to bind compose to a key somewhere in their settings menu.
a lot of people disable capslock anyway, so why not give the key something more useful to do? if you already use capslock for something, there's quite a few other keys that are available to be rebound:
if you want to change what sequences create what charachters, you can do the following:
cp /usr/share/X11/locale/en_US.UTF-8/Compose ~/.XCompose
(you can put it somewhere else if you set $XCOMPOSEFILE to the path for that file)
note on the format of the file: you need to always put <Multi_key> first if you want the sequence to require the compose key. using a regular key first may make you unable to use that key normally.
after editing the file, you will need to relaunch your applications for the changes to take effect.
you can check out my dotfiles repo for an example: