In my ~/.XCompose, I have this line:

<Multi_key> + <3> + <3> : "¯\_(ツ)_/¯" # Shrug.

Which sadly, does not do what I want. Since only the first characters of the shrug is used.

Can I have multiple characters based of one key combinations?


Compose sequences which outputs strings (as opposed to just boring characters) seem to work in some applications. I’ve only tested a few.

It works in:

  • gedit
  • xterm

It doesn’t work in:

  • firefox
  • gnome-terminal

Also your mapping doesn’t work for me. But it does if I remove the plus signs:

<Multi_key> <3> <3> : "¯\_(ツ)_/¯" # Shrug.

And you should escape the backwards slash:

<Multi_key> <3> <3> : "¯\\_(ツ)_/¯" # Shrug.
  • 1
    Of course, it works in things I do not use and does not in things I do. Typical! ☺Thank you. – Sardathrion - against SE abuse Oct 29 '19 at 8:03
  • 2
    I've tested right now, and those multi-char sequences definitely work on the browser (but seem to fail in Qt applications). Remember that ~/.XCompose is read by libX11 only during a program startup, which means new processes will support new mappings, while old ones need to be relaunched. wiki.debian.org/XCompose – Denilson Sá Maia Nov 12 '19 at 13:39
  • 2
    Works for me in Firefox and gnome-terminal on Fedora 32. IBus 1.5.21 (Aug 23, 2019) had enhancements to the Compose key functionality. That might explain why it now works. desktopi18n.wordpress.com/2019/10/17/ibus-1-5-21-is-released I tested in both X11 and Wayland. – Robin A. Meade May 15 '20 at 5:44
  • 3
    @TomAnderson I successfully tested in the Cinnamon Spin of Fedora 32. The blog post I linked to says "you need to enable more than one IBus engine." I used im-chooser > Use IBus > Preferences to add Japanese - Kana Kanji and then the above example of 33 becoming a shrug worked. I do see a warning printed in the console by im-chooser which says "GTK+ supports to output one char only." But it works anyway. – Robin A. Meade Jun 8 '20 at 2:59
  • 2
    @RobinA.Meade Aha! I had missed that detail, and indeed, with that trick, it works! Thank you! I don't know Japanese, so i have picked Ancient Greek as my second engine, which is fine υντιλ ι αχτἰατε ιτ βψ μιστακε. I notice that now when i use the compose key, a special marker appears, an underlined square overlapping a circle. Clearly some more powerful sorcery is now at work. Right, off to set up compose sequences for all the alchemical symbols i've been missing ... – Tom Anderson Jun 8 '20 at 13:21

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.