Custom ComposeKey sequences in 18.04

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












How do I add user-defined compose key rules in Ubuntu 18.04? I turned my Compose key on using Gnome Tweaks (it's on CapsLock), created a .XCompose starting with these lines:



include "%L" # import the default Compose file for your locale

# IPA

<Multi_key> <a> <h> : "ɑ"
<Multi_key> <A> <h> : "â±­"
# Some more lines
<Multi_key> <ampersand> <underscore> <m> : "̼"



# Math

<Multi_key> <minus> <0> : "−"
<Multi_key> <asterisk> <1> : "⋅"
<Multi_key> <x> <x> : "×"
# ...


I followed this advice, installed uim and set it as GTK_ and QT_IM_MODULE but every sequence starting with the <minus> <0> line gets ignored. When I tried xim, it did a bit better but it made gedit glitch:



xim glitch



.



When I tried GTK_IM_MODULE=gtk-im-context-simple, most of the sequences started working, but some of them just don't.



<Multi_key> <minus> <0> : "−" # doesn't work
<Multi_key> <asterisk> <1> : "⋅" # doesn't work
<Multi_key> <e> <m> <o> <colon> <space> : "😶" # works
<Multi_key> <e> <m> <o> <colon> <Up> : "🙄" # works
<Multi_key> <e> <m> <o> <x> <asterisk> <space> : "😙" # doesn't work
<Multi_key> <e> <m> <o> <c> <a> <l> <l> : "🤙" # doesn't work
<Multi_key> <e> <m> <o> <o> <k> : "👌" # works
<Multi_key> <w> <t> <f> : "ಠ_ಠ" # doesn't work
<Multi_key> <w> <h> <y> : "ლ(ಠ益ಠლ)" # doesn't work
<Multi_key> <0> <space> : "​" # zero-width space doesn't work


.



What should I do to make my Compose key work properly?







share|improve this question


















  • 1




    Can you add info about what you did to turn on the compose key? That is, what is the location of the settings you changed and which settings you selected? (Wondering if you used the GUI or edited /etc/default/keyboard or something else?)
    – xiota
    May 18 at 12:03










  • I used Gnome Tweaks, see the updated question.
    – m93a
    May 20 at 14:53










  • I put keyboard settings in /etc/default/keyboard. Don't know if it makes a difference. You can also try putting the include at the end of the config to see if it makes a difference. Otherwise, it looks like multi-character output and sequences longer than 5 won't work.
    – xiota
    May 20 at 16:11














up vote
1
down vote

favorite












How do I add user-defined compose key rules in Ubuntu 18.04? I turned my Compose key on using Gnome Tweaks (it's on CapsLock), created a .XCompose starting with these lines:



include "%L" # import the default Compose file for your locale

# IPA

<Multi_key> <a> <h> : "ɑ"
<Multi_key> <A> <h> : "â±­"
# Some more lines
<Multi_key> <ampersand> <underscore> <m> : "̼"



# Math

<Multi_key> <minus> <0> : "−"
<Multi_key> <asterisk> <1> : "⋅"
<Multi_key> <x> <x> : "×"
# ...


I followed this advice, installed uim and set it as GTK_ and QT_IM_MODULE but every sequence starting with the <minus> <0> line gets ignored. When I tried xim, it did a bit better but it made gedit glitch:



xim glitch



.



When I tried GTK_IM_MODULE=gtk-im-context-simple, most of the sequences started working, but some of them just don't.



<Multi_key> <minus> <0> : "−" # doesn't work
<Multi_key> <asterisk> <1> : "⋅" # doesn't work
<Multi_key> <e> <m> <o> <colon> <space> : "😶" # works
<Multi_key> <e> <m> <o> <colon> <Up> : "🙄" # works
<Multi_key> <e> <m> <o> <x> <asterisk> <space> : "😙" # doesn't work
<Multi_key> <e> <m> <o> <c> <a> <l> <l> : "🤙" # doesn't work
<Multi_key> <e> <m> <o> <o> <k> : "👌" # works
<Multi_key> <w> <t> <f> : "ಠ_ಠ" # doesn't work
<Multi_key> <w> <h> <y> : "ლ(ಠ益ಠლ)" # doesn't work
<Multi_key> <0> <space> : "​" # zero-width space doesn't work


.



What should I do to make my Compose key work properly?







share|improve this question


















  • 1




    Can you add info about what you did to turn on the compose key? That is, what is the location of the settings you changed and which settings you selected? (Wondering if you used the GUI or edited /etc/default/keyboard or something else?)
    – xiota
    May 18 at 12:03










  • I used Gnome Tweaks, see the updated question.
    – m93a
    May 20 at 14:53










  • I put keyboard settings in /etc/default/keyboard. Don't know if it makes a difference. You can also try putting the include at the end of the config to see if it makes a difference. Otherwise, it looks like multi-character output and sequences longer than 5 won't work.
    – xiota
    May 20 at 16:11












up vote
1
down vote

favorite









up vote
1
down vote

favorite











How do I add user-defined compose key rules in Ubuntu 18.04? I turned my Compose key on using Gnome Tweaks (it's on CapsLock), created a .XCompose starting with these lines:



include "%L" # import the default Compose file for your locale

# IPA

<Multi_key> <a> <h> : "ɑ"
<Multi_key> <A> <h> : "â±­"
# Some more lines
<Multi_key> <ampersand> <underscore> <m> : "̼"



# Math

<Multi_key> <minus> <0> : "−"
<Multi_key> <asterisk> <1> : "⋅"
<Multi_key> <x> <x> : "×"
# ...


I followed this advice, installed uim and set it as GTK_ and QT_IM_MODULE but every sequence starting with the <minus> <0> line gets ignored. When I tried xim, it did a bit better but it made gedit glitch:



xim glitch



.



When I tried GTK_IM_MODULE=gtk-im-context-simple, most of the sequences started working, but some of them just don't.



<Multi_key> <minus> <0> : "−" # doesn't work
<Multi_key> <asterisk> <1> : "⋅" # doesn't work
<Multi_key> <e> <m> <o> <colon> <space> : "😶" # works
<Multi_key> <e> <m> <o> <colon> <Up> : "🙄" # works
<Multi_key> <e> <m> <o> <x> <asterisk> <space> : "😙" # doesn't work
<Multi_key> <e> <m> <o> <c> <a> <l> <l> : "🤙" # doesn't work
<Multi_key> <e> <m> <o> <o> <k> : "👌" # works
<Multi_key> <w> <t> <f> : "ಠ_ಠ" # doesn't work
<Multi_key> <w> <h> <y> : "ლ(ಠ益ಠლ)" # doesn't work
<Multi_key> <0> <space> : "​" # zero-width space doesn't work


.



What should I do to make my Compose key work properly?







share|improve this question














How do I add user-defined compose key rules in Ubuntu 18.04? I turned my Compose key on using Gnome Tweaks (it's on CapsLock), created a .XCompose starting with these lines:



include "%L" # import the default Compose file for your locale

# IPA

<Multi_key> <a> <h> : "ɑ"
<Multi_key> <A> <h> : "â±­"
# Some more lines
<Multi_key> <ampersand> <underscore> <m> : "̼"



# Math

<Multi_key> <minus> <0> : "−"
<Multi_key> <asterisk> <1> : "⋅"
<Multi_key> <x> <x> : "×"
# ...


I followed this advice, installed uim and set it as GTK_ and QT_IM_MODULE but every sequence starting with the <minus> <0> line gets ignored. When I tried xim, it did a bit better but it made gedit glitch:



xim glitch



.



When I tried GTK_IM_MODULE=gtk-im-context-simple, most of the sequences started working, but some of them just don't.



<Multi_key> <minus> <0> : "−" # doesn't work
<Multi_key> <asterisk> <1> : "⋅" # doesn't work
<Multi_key> <e> <m> <o> <colon> <space> : "😶" # works
<Multi_key> <e> <m> <o> <colon> <Up> : "🙄" # works
<Multi_key> <e> <m> <o> <x> <asterisk> <space> : "😙" # doesn't work
<Multi_key> <e> <m> <o> <c> <a> <l> <l> : "🤙" # doesn't work
<Multi_key> <e> <m> <o> <o> <k> : "👌" # works
<Multi_key> <w> <t> <f> : "ಠ_ಠ" # doesn't work
<Multi_key> <w> <h> <y> : "ლ(ಠ益ಠლ)" # doesn't work
<Multi_key> <0> <space> : "​" # zero-width space doesn't work


.



What should I do to make my Compose key work properly?









share|improve this question













share|improve this question




share|improve this question








edited May 20 at 14:52

























asked May 18 at 0:18









m93a

14112




14112







  • 1




    Can you add info about what you did to turn on the compose key? That is, what is the location of the settings you changed and which settings you selected? (Wondering if you used the GUI or edited /etc/default/keyboard or something else?)
    – xiota
    May 18 at 12:03










  • I used Gnome Tweaks, see the updated question.
    – m93a
    May 20 at 14:53










  • I put keyboard settings in /etc/default/keyboard. Don't know if it makes a difference. You can also try putting the include at the end of the config to see if it makes a difference. Otherwise, it looks like multi-character output and sequences longer than 5 won't work.
    – xiota
    May 20 at 16:11












  • 1




    Can you add info about what you did to turn on the compose key? That is, what is the location of the settings you changed and which settings you selected? (Wondering if you used the GUI or edited /etc/default/keyboard or something else?)
    – xiota
    May 18 at 12:03










  • I used Gnome Tweaks, see the updated question.
    – m93a
    May 20 at 14:53










  • I put keyboard settings in /etc/default/keyboard. Don't know if it makes a difference. You can also try putting the include at the end of the config to see if it makes a difference. Otherwise, it looks like multi-character output and sequences longer than 5 won't work.
    – xiota
    May 20 at 16:11







1




1




Can you add info about what you did to turn on the compose key? That is, what is the location of the settings you changed and which settings you selected? (Wondering if you used the GUI or edited /etc/default/keyboard or something else?)
– xiota
May 18 at 12:03




Can you add info about what you did to turn on the compose key? That is, what is the location of the settings you changed and which settings you selected? (Wondering if you used the GUI or edited /etc/default/keyboard or something else?)
– xiota
May 18 at 12:03












I used Gnome Tweaks, see the updated question.
– m93a
May 20 at 14:53




I used Gnome Tweaks, see the updated question.
– m93a
May 20 at 14:53












I put keyboard settings in /etc/default/keyboard. Don't know if it makes a difference. You can also try putting the include at the end of the config to see if it makes a difference. Otherwise, it looks like multi-character output and sequences longer than 5 won't work.
– xiota
May 20 at 16:11




I put keyboard settings in /etc/default/keyboard. Don't know if it makes a difference. You can also try putting the include at the end of the config to see if it makes a difference. Otherwise, it looks like multi-character output and sequences longer than 5 won't work.
– xiota
May 20 at 16:11










1 Answer
1






active

oldest

votes

















up vote
0
down vote













The link you point to is basically correct, with a few caveats:




  • Compose inserts the character corresponding to the first (shortest) match. Suppose .XCompose contains the following entries:



     <Multi_key> <space> : " " nobreakspace # NO-BREAK SPACE
    <Multi_key> <space> <space> : " " U2002 # EN SPACE
    <Multi_key> <space> <space> <space> : " " U2003 # EM SPACE


    Attempts to use EN-SPACE or EM-SPACE will never work.




  • To get Compose to work with GTK, add the following line to .profile:



    export GTK_IM_MODULE=gtk-im-context-simple






share|improve this answer






















  • My problem isn't that my rules are overwritten with shorter ones -- they simply don't work at all, they just do nothing. And it seems to me that which rules work and which don't changes during the session. For example just a while ago I could use minus minus period to write a dash, but now it just doesn't work. (I would add a thinking emoji but -- you know, my compose key doesn't work...)
    – m93a
    May 18 at 9:23











  • Have you tried adding export GTK_IM_MODULE=gtk-im-context-simple to ~/.profile?
    – xiota
    May 18 at 12:01










  • I tried it but some sequences (especially the longer ones) just don't work.
    – m93a
    May 20 at 14:10










  • Oh and sometimes my keyboard just stops working altogether since I set gtk-im-context-simple. Only reboot fixes it... 😕
    – m93a
    May 20 at 17:40










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1037597%2fcustom-composekey-sequences-in-18-04%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













The link you point to is basically correct, with a few caveats:




  • Compose inserts the character corresponding to the first (shortest) match. Suppose .XCompose contains the following entries:



     <Multi_key> <space> : " " nobreakspace # NO-BREAK SPACE
    <Multi_key> <space> <space> : " " U2002 # EN SPACE
    <Multi_key> <space> <space> <space> : " " U2003 # EM SPACE


    Attempts to use EN-SPACE or EM-SPACE will never work.




  • To get Compose to work with GTK, add the following line to .profile:



    export GTK_IM_MODULE=gtk-im-context-simple






share|improve this answer






















  • My problem isn't that my rules are overwritten with shorter ones -- they simply don't work at all, they just do nothing. And it seems to me that which rules work and which don't changes during the session. For example just a while ago I could use minus minus period to write a dash, but now it just doesn't work. (I would add a thinking emoji but -- you know, my compose key doesn't work...)
    – m93a
    May 18 at 9:23











  • Have you tried adding export GTK_IM_MODULE=gtk-im-context-simple to ~/.profile?
    – xiota
    May 18 at 12:01










  • I tried it but some sequences (especially the longer ones) just don't work.
    – m93a
    May 20 at 14:10










  • Oh and sometimes my keyboard just stops working altogether since I set gtk-im-context-simple. Only reboot fixes it... 😕
    – m93a
    May 20 at 17:40














up vote
0
down vote













The link you point to is basically correct, with a few caveats:




  • Compose inserts the character corresponding to the first (shortest) match. Suppose .XCompose contains the following entries:



     <Multi_key> <space> : " " nobreakspace # NO-BREAK SPACE
    <Multi_key> <space> <space> : " " U2002 # EN SPACE
    <Multi_key> <space> <space> <space> : " " U2003 # EM SPACE


    Attempts to use EN-SPACE or EM-SPACE will never work.




  • To get Compose to work with GTK, add the following line to .profile:



    export GTK_IM_MODULE=gtk-im-context-simple






share|improve this answer






















  • My problem isn't that my rules are overwritten with shorter ones -- they simply don't work at all, they just do nothing. And it seems to me that which rules work and which don't changes during the session. For example just a while ago I could use minus minus period to write a dash, but now it just doesn't work. (I would add a thinking emoji but -- you know, my compose key doesn't work...)
    – m93a
    May 18 at 9:23











  • Have you tried adding export GTK_IM_MODULE=gtk-im-context-simple to ~/.profile?
    – xiota
    May 18 at 12:01










  • I tried it but some sequences (especially the longer ones) just don't work.
    – m93a
    May 20 at 14:10










  • Oh and sometimes my keyboard just stops working altogether since I set gtk-im-context-simple. Only reboot fixes it... 😕
    – m93a
    May 20 at 17:40












up vote
0
down vote










up vote
0
down vote









The link you point to is basically correct, with a few caveats:




  • Compose inserts the character corresponding to the first (shortest) match. Suppose .XCompose contains the following entries:



     <Multi_key> <space> : " " nobreakspace # NO-BREAK SPACE
    <Multi_key> <space> <space> : " " U2002 # EN SPACE
    <Multi_key> <space> <space> <space> : " " U2003 # EM SPACE


    Attempts to use EN-SPACE or EM-SPACE will never work.




  • To get Compose to work with GTK, add the following line to .profile:



    export GTK_IM_MODULE=gtk-im-context-simple






share|improve this answer














The link you point to is basically correct, with a few caveats:




  • Compose inserts the character corresponding to the first (shortest) match. Suppose .XCompose contains the following entries:



     <Multi_key> <space> : " " nobreakspace # NO-BREAK SPACE
    <Multi_key> <space> <space> : " " U2002 # EN SPACE
    <Multi_key> <space> <space> <space> : " " U2003 # EM SPACE


    Attempts to use EN-SPACE or EM-SPACE will never work.




  • To get Compose to work with GTK, add the following line to .profile:



    export GTK_IM_MODULE=gtk-im-context-simple







share|improve this answer














share|improve this answer



share|improve this answer








edited May 18 at 2:58

























answered May 18 at 2:37









xiota

1,0461422




1,0461422











  • My problem isn't that my rules are overwritten with shorter ones -- they simply don't work at all, they just do nothing. And it seems to me that which rules work and which don't changes during the session. For example just a while ago I could use minus minus period to write a dash, but now it just doesn't work. (I would add a thinking emoji but -- you know, my compose key doesn't work...)
    – m93a
    May 18 at 9:23











  • Have you tried adding export GTK_IM_MODULE=gtk-im-context-simple to ~/.profile?
    – xiota
    May 18 at 12:01










  • I tried it but some sequences (especially the longer ones) just don't work.
    – m93a
    May 20 at 14:10










  • Oh and sometimes my keyboard just stops working altogether since I set gtk-im-context-simple. Only reboot fixes it... 😕
    – m93a
    May 20 at 17:40
















  • My problem isn't that my rules are overwritten with shorter ones -- they simply don't work at all, they just do nothing. And it seems to me that which rules work and which don't changes during the session. For example just a while ago I could use minus minus period to write a dash, but now it just doesn't work. (I would add a thinking emoji but -- you know, my compose key doesn't work...)
    – m93a
    May 18 at 9:23











  • Have you tried adding export GTK_IM_MODULE=gtk-im-context-simple to ~/.profile?
    – xiota
    May 18 at 12:01










  • I tried it but some sequences (especially the longer ones) just don't work.
    – m93a
    May 20 at 14:10










  • Oh and sometimes my keyboard just stops working altogether since I set gtk-im-context-simple. Only reboot fixes it... 😕
    – m93a
    May 20 at 17:40















My problem isn't that my rules are overwritten with shorter ones -- they simply don't work at all, they just do nothing. And it seems to me that which rules work and which don't changes during the session. For example just a while ago I could use minus minus period to write a dash, but now it just doesn't work. (I would add a thinking emoji but -- you know, my compose key doesn't work...)
– m93a
May 18 at 9:23





My problem isn't that my rules are overwritten with shorter ones -- they simply don't work at all, they just do nothing. And it seems to me that which rules work and which don't changes during the session. For example just a while ago I could use minus minus period to write a dash, but now it just doesn't work. (I would add a thinking emoji but -- you know, my compose key doesn't work...)
– m93a
May 18 at 9:23













Have you tried adding export GTK_IM_MODULE=gtk-im-context-simple to ~/.profile?
– xiota
May 18 at 12:01




Have you tried adding export GTK_IM_MODULE=gtk-im-context-simple to ~/.profile?
– xiota
May 18 at 12:01












I tried it but some sequences (especially the longer ones) just don't work.
– m93a
May 20 at 14:10




I tried it but some sequences (especially the longer ones) just don't work.
– m93a
May 20 at 14:10












Oh and sometimes my keyboard just stops working altogether since I set gtk-im-context-simple. Only reboot fixes it... 😕
– m93a
May 20 at 17:40




Oh and sometimes my keyboard just stops working altogether since I set gtk-im-context-simple. Only reboot fixes it... 😕
– m93a
May 20 at 17:40












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1037597%2fcustom-composekey-sequences-in-18-04%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491