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?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityIn 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:
It doesn’t work in:
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.
I’ve ended up using compose sequences that output strings (rather than just single keysyms/characters) quite a lot. I mostly use it for single words.
In my experience it works really well, i.e. it works on most contexts that I type things.
This emoji now works for me in all four applications that I originally tested.
My own strings don’t contain Katakana (ツ) so they might be easier to use in more settings (higher Unicode code points might be less supported?).
Some exceptions:
~/.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
Nov 12, 2019 at 13:39
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.
Jun 8, 2020 at 2:59