How to extend the Compose key

I was looking for a way to extend the compose key (from tweaks) ability to be able to type arbitrary Unicode characters with custom key combinations.

ex. compose_key + 'l' + 'a' + 'm' = 'λ'

1 Answer

I had this question myself and found an answer eventually (thanks to this reddit post)

There is a rather simple way to extend the compose key.

You simply have to create the file ~/.XCompose and put your new key combinations in there.

Example of my XCompose file:

> cat .XCompose
include "%L"
# Math symbols
<Multi_key> <p> <i> : "π" U03C0 # GREEK SMALL LETTER PI
<Multi_key> <S> <i> <g> : "∑" U2211 # Sigma
# Misc symbols
<Multi_key> <asterisk> <asterisk> : "•" U2022 # bullet point
# Agda symbols
<Multi_key> <T> <o> <p> : "⊤" U22A4 # Down Tack/Top
<Multi_key> <B> <o> <t> : "⊥" U22A5 # Up Tack/Bot
> …

You just need to add them in there, I use This Site to find the UNICODE value of the character, in case anyone wants a site, though there are many alternative ways to find it.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like