Adding custom Compose key sequences












11















How can one add custom Compose-key sequences? I have googled quite a bit, but could not find an explanation. In particular, I would like to have:



<Compose> + <Z> + <Z> = ℤ # Blackboard bold Z (set of integers)


In particular, I tried copying the file /usr/share/X11/locale/en_US.UTF-8/Compose to ~/.XCompose, and mimicked its syntax. However, this did not seem to work.










share|improve this question

























  • What did you do after creating ~/.XCompose to activate it?

    – l0b0
    Dec 4 '13 at 13:07













  • well, nothing particular. The site I got this from didn't mention anything. What is one supposed to do?

    – jmc
    Dec 4 '13 at 13:13
















11















How can one add custom Compose-key sequences? I have googled quite a bit, but could not find an explanation. In particular, I would like to have:



<Compose> + <Z> + <Z> = ℤ # Blackboard bold Z (set of integers)


In particular, I tried copying the file /usr/share/X11/locale/en_US.UTF-8/Compose to ~/.XCompose, and mimicked its syntax. However, this did not seem to work.










share|improve this question

























  • What did you do after creating ~/.XCompose to activate it?

    – l0b0
    Dec 4 '13 at 13:07













  • well, nothing particular. The site I got this from didn't mention anything. What is one supposed to do?

    – jmc
    Dec 4 '13 at 13:13














11












11








11








How can one add custom Compose-key sequences? I have googled quite a bit, but could not find an explanation. In particular, I would like to have:



<Compose> + <Z> + <Z> = ℤ # Blackboard bold Z (set of integers)


In particular, I tried copying the file /usr/share/X11/locale/en_US.UTF-8/Compose to ~/.XCompose, and mimicked its syntax. However, this did not seem to work.










share|improve this question
















How can one add custom Compose-key sequences? I have googled quite a bit, but could not find an explanation. In particular, I would like to have:



<Compose> + <Z> + <Z> = ℤ # Blackboard bold Z (set of integers)


In particular, I tried copying the file /usr/share/X11/locale/en_US.UTF-8/Compose to ~/.XCompose, and mimicked its syntax. However, this did not seem to work.







x11 keyboard-layout compose-key






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 4 '13 at 21:07









Gilles

541k12810941610




541k12810941610










asked Dec 4 '13 at 10:57









jmcjmc

233212




233212













  • What did you do after creating ~/.XCompose to activate it?

    – l0b0
    Dec 4 '13 at 13:07













  • well, nothing particular. The site I got this from didn't mention anything. What is one supposed to do?

    – jmc
    Dec 4 '13 at 13:13



















  • What did you do after creating ~/.XCompose to activate it?

    – l0b0
    Dec 4 '13 at 13:07













  • well, nothing particular. The site I got this from didn't mention anything. What is one supposed to do?

    – jmc
    Dec 4 '13 at 13:13

















What did you do after creating ~/.XCompose to activate it?

– l0b0
Dec 4 '13 at 13:07







What did you do after creating ~/.XCompose to activate it?

– l0b0
Dec 4 '13 at 13:07















well, nothing particular. The site I got this from didn't mention anything. What is one supposed to do?

– jmc
Dec 4 '13 at 13:13





well, nothing particular. The site I got this from didn't mention anything. What is one supposed to do?

– jmc
Dec 4 '13 at 13:13










2 Answers
2






active

oldest

votes


















-1














See @Gilles' answer.



Original answer:





You may need to log out and in again, since your personal configuration files are read when logging in.



(There may also be some way to activate it without logging out and in again, but I'm not familiar with this specific configuration file.)






share|improve this answer





















  • 4





    No, you don't need to log out, only to restart the applications. The compose table is read by each application. For KDE, you may need to restart kdeinit, I haven't checked.

    – Gilles
    Dec 5 '13 at 13:21








  • 1





    This is not an answer, at least without the actual actions required before logging out and in again.

    – naught101
    Dec 24 '13 at 5:09











  • @naught101 The user has already performed those. The question was how to activate the new settings.

    – l0b0
    Dec 24 '13 at 10:49



















11














You're almost there: the file is indeed ~/.XCompose. You can specify an alternate location with the XCOMPOSEFILE environment variable. See the Compose manual page.



The missing piece of the puzzle is that the file is read by each application when it starts. The Compose key is not handled by the X11 server, but by the X11 library. In theory, an application could detect that the file has been modified or offer a command to reload it but I don't know of any that does. You'll have to restart your applications. Start a new editor or terminal emulator for testing.






share|improve this answer
























  • Thanks for your answer! I feel really stupid for not checking whether there was a compose manpage. However, Google did not turn it up either…

    – jmc
    Dec 5 '13 at 13:09











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
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',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f103649%2fadding-custom-compose-key-sequences%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









-1














See @Gilles' answer.



Original answer:





You may need to log out and in again, since your personal configuration files are read when logging in.



(There may also be some way to activate it without logging out and in again, but I'm not familiar with this specific configuration file.)






share|improve this answer





















  • 4





    No, you don't need to log out, only to restart the applications. The compose table is read by each application. For KDE, you may need to restart kdeinit, I haven't checked.

    – Gilles
    Dec 5 '13 at 13:21








  • 1





    This is not an answer, at least without the actual actions required before logging out and in again.

    – naught101
    Dec 24 '13 at 5:09











  • @naught101 The user has already performed those. The question was how to activate the new settings.

    – l0b0
    Dec 24 '13 at 10:49
















-1














See @Gilles' answer.



Original answer:





You may need to log out and in again, since your personal configuration files are read when logging in.



(There may also be some way to activate it without logging out and in again, but I'm not familiar with this specific configuration file.)






share|improve this answer





















  • 4





    No, you don't need to log out, only to restart the applications. The compose table is read by each application. For KDE, you may need to restart kdeinit, I haven't checked.

    – Gilles
    Dec 5 '13 at 13:21








  • 1





    This is not an answer, at least without the actual actions required before logging out and in again.

    – naught101
    Dec 24 '13 at 5:09











  • @naught101 The user has already performed those. The question was how to activate the new settings.

    – l0b0
    Dec 24 '13 at 10:49














-1












-1








-1







See @Gilles' answer.



Original answer:





You may need to log out and in again, since your personal configuration files are read when logging in.



(There may also be some way to activate it without logging out and in again, but I'm not familiar with this specific configuration file.)






share|improve this answer















See @Gilles' answer.



Original answer:





You may need to log out and in again, since your personal configuration files are read when logging in.



(There may also be some way to activate it without logging out and in again, but I'm not familiar with this specific configuration file.)







share|improve this answer














share|improve this answer



share|improve this answer








edited Feb 19 at 18:35

























answered Dec 5 '13 at 12:25









l0b0l0b0

28.4k19120248




28.4k19120248








  • 4





    No, you don't need to log out, only to restart the applications. The compose table is read by each application. For KDE, you may need to restart kdeinit, I haven't checked.

    – Gilles
    Dec 5 '13 at 13:21








  • 1





    This is not an answer, at least without the actual actions required before logging out and in again.

    – naught101
    Dec 24 '13 at 5:09











  • @naught101 The user has already performed those. The question was how to activate the new settings.

    – l0b0
    Dec 24 '13 at 10:49














  • 4





    No, you don't need to log out, only to restart the applications. The compose table is read by each application. For KDE, you may need to restart kdeinit, I haven't checked.

    – Gilles
    Dec 5 '13 at 13:21








  • 1





    This is not an answer, at least without the actual actions required before logging out and in again.

    – naught101
    Dec 24 '13 at 5:09











  • @naught101 The user has already performed those. The question was how to activate the new settings.

    – l0b0
    Dec 24 '13 at 10:49








4




4





No, you don't need to log out, only to restart the applications. The compose table is read by each application. For KDE, you may need to restart kdeinit, I haven't checked.

– Gilles
Dec 5 '13 at 13:21







No, you don't need to log out, only to restart the applications. The compose table is read by each application. For KDE, you may need to restart kdeinit, I haven't checked.

– Gilles
Dec 5 '13 at 13:21






1




1





This is not an answer, at least without the actual actions required before logging out and in again.

– naught101
Dec 24 '13 at 5:09





This is not an answer, at least without the actual actions required before logging out and in again.

– naught101
Dec 24 '13 at 5:09













@naught101 The user has already performed those. The question was how to activate the new settings.

– l0b0
Dec 24 '13 at 10:49





@naught101 The user has already performed those. The question was how to activate the new settings.

– l0b0
Dec 24 '13 at 10:49













11














You're almost there: the file is indeed ~/.XCompose. You can specify an alternate location with the XCOMPOSEFILE environment variable. See the Compose manual page.



The missing piece of the puzzle is that the file is read by each application when it starts. The Compose key is not handled by the X11 server, but by the X11 library. In theory, an application could detect that the file has been modified or offer a command to reload it but I don't know of any that does. You'll have to restart your applications. Start a new editor or terminal emulator for testing.






share|improve this answer
























  • Thanks for your answer! I feel really stupid for not checking whether there was a compose manpage. However, Google did not turn it up either…

    – jmc
    Dec 5 '13 at 13:09
















11














You're almost there: the file is indeed ~/.XCompose. You can specify an alternate location with the XCOMPOSEFILE environment variable. See the Compose manual page.



The missing piece of the puzzle is that the file is read by each application when it starts. The Compose key is not handled by the X11 server, but by the X11 library. In theory, an application could detect that the file has been modified or offer a command to reload it but I don't know of any that does. You'll have to restart your applications. Start a new editor or terminal emulator for testing.






share|improve this answer
























  • Thanks for your answer! I feel really stupid for not checking whether there was a compose manpage. However, Google did not turn it up either…

    – jmc
    Dec 5 '13 at 13:09














11












11








11







You're almost there: the file is indeed ~/.XCompose. You can specify an alternate location with the XCOMPOSEFILE environment variable. See the Compose manual page.



The missing piece of the puzzle is that the file is read by each application when it starts. The Compose key is not handled by the X11 server, but by the X11 library. In theory, an application could detect that the file has been modified or offer a command to reload it but I don't know of any that does. You'll have to restart your applications. Start a new editor or terminal emulator for testing.






share|improve this answer













You're almost there: the file is indeed ~/.XCompose. You can specify an alternate location with the XCOMPOSEFILE environment variable. See the Compose manual page.



The missing piece of the puzzle is that the file is read by each application when it starts. The Compose key is not handled by the X11 server, but by the X11 library. In theory, an application could detect that the file has been modified or offer a command to reload it but I don't know of any that does. You'll have to restart your applications. Start a new editor or terminal emulator for testing.







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 5 '13 at 1:35









GillesGilles

541k12810941610




541k12810941610













  • Thanks for your answer! I feel really stupid for not checking whether there was a compose manpage. However, Google did not turn it up either…

    – jmc
    Dec 5 '13 at 13:09



















  • Thanks for your answer! I feel really stupid for not checking whether there was a compose manpage. However, Google did not turn it up either…

    – jmc
    Dec 5 '13 at 13:09

















Thanks for your answer! I feel really stupid for not checking whether there was a compose manpage. However, Google did not turn it up either…

– jmc
Dec 5 '13 at 13:09





Thanks for your answer! I feel really stupid for not checking whether there was a compose manpage. However, Google did not turn it up either…

– jmc
Dec 5 '13 at 13:09


















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f103649%2fadding-custom-compose-key-sequences%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

is 'sed' thread safe

How to make a Squid Proxy server?