I am trying to allow for a compose key - I would like to type in unicode characters with one keystroke (that is my end goal here).

I got here (see picture):

enter image description here

But I cannot seem to enable it. Anyone know how I can enable the compose key, so that I can type unicode characters. On MacOS, I can type alt+j and I get ∆, that's the kind of functionality I am looking for.

  • Please do not waste your bounty and reward one answer – Yves Martin Jul 28 '17 at 8:24

Compose key behaves a bit differently than you expect. It is not a modifier like Ctrl or Alt which should remain pressed while you typing the rest character(s). Compose is pressed, then released and the keyboard switches to the state which waits for the additional key sequence. If the key sequence is valid, it is transformed into some Unicode symbol, if it is invalid, keyboard leaves this state and waits for the next keystrokes. For example, to enter Em-dash symbol (long dash) I should press Compose, -, -, - sequentially.
Valid sequences can be found here.
And one more source: /usr/share/X11/locale/en_US.UTF-8/Compose (this one is huge).

In order to set Compose key, press Disabled word to the right of Compose in the window you provided in your question. Then press the button which will take over Compose function. For example, I use Menu button, which isn't used too often. It is located between right Super (with window logo) and right Ctrl. Close the window and try some Compose combination in any editor.


I invite you to enable Compose key to use standard sequences, where greek letters are available behind a <dead_greek> key you have to map on your keyboard with xmodmap. For this option, please refer to details at https://superuser.com/a/1229239/115238

To create sequences for your own need, you also can follow these instructions . For greek letter in mathematics context, you may also simply reuse proposals you can found here.

To sum up, but please read previous references for details:

First, enforce xim input method thanks to export GTK_IM_MODULE=xim in /etc/environment

Second, create your own .XCompose file in your $HOME folder, including your current language keyboard mapping compose sequences:

include "%L"
<Multi_key> <period> <backslash>       : "λ"   U03BB  # GREEK SMALL LETTER LAMBDA
<Multi_key> <slash> <backslash>        : "Λ"   U039B  # GREEK CAPITAL LETTER LAMBDA
<Multi_key> <asciicircum> <underscore> : "Δ"   U0394  # GREEK CAPITAL LETTER DELTA

To get effects, you have to restart your desktop environment. For information, %L refers to your current keyboard mapping /usr/share/X11/locale/en_US.UTF-8/Compose.

Compose key behavior is configured with graphical symbols addition in mind, for instance, Compose Y = produces ¥

That is why I proposed Compose ^ _ to produce Δ instead of latin letter equivalent D prefixed by g like you may find at https://gist.github.com/pkgw/5422749

Remark: WinCompose tool allows to get same intuitive behavior on Windows system.

  • 1
    One note: "Δ" is Greek capital Delta, capital Lambda is "Λ". Aside from that, your answer has got valuable info regarding ~/.XCompose and custom combinations for Compose key. – whtyger Jul 27 '17 at 17:32
  • Thanks for reporting such a mistake. I have not done maths or physics since decades... – Yves Martin Jul 28 '17 at 7:43

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.