Typing dead key after base letter












2















The US International keyboard allows to add diacritics by means of dead keys.
Specifically:



`a maps to à and
'a maps to á.



In X, using the international or the standard US keyboard, I would like instead to set mappings like this:



a` maps to á and
a' maps to à.



As you can see, I would like the dead key to be typed after the base letter and also I prefer to swap the acute and grave accent dead keys. (This makes typing much faster and natural for me and, in case the dead key functionality is disabled, words with attached diacritics are more readable).



Can you address me to the proper tools/config files to achieve this?

In case it is relevant to the answer, my distro is Arch Linux.










share|improve this question

























  • And how would you enter a a without accent? Do you really want the typing of they're to produce theỳre? Or do you want to limit it to only a few base letters?

    – Stéphane Chazelas
    Apr 23 '18 at 14:30








  • 1





    You would have to handle this at the application level, since the a is typically already delivered to the application after it has been typed.

    – Johan Myréen
    Apr 23 '18 at 14:31











  • @JohanMyréen, one could imagine a generic handler that generates a Backspace key pressed, Backspace key released, à key pressed, à key released sequence of events when one presses ' while the last key event was for a a key.

    – Stéphane Chazelas
    Apr 23 '18 at 14:35











  • @Stéphane and then one can imagine all the edge cases which need to be handled ;-). The compose key seems like a much safer proposition...

    – Stephen Kitt
    Apr 23 '18 at 16:10











  • @StéphaneChazelas: There are no edge cases, unless you are typing maths. Accents are needed only for vowels, while apostrophes in English are used after consonants. When typing maths in technical documents, one would switch to the standard English keyboard.

    – antonio
    May 8 '18 at 17:55
















2















The US International keyboard allows to add diacritics by means of dead keys.
Specifically:



`a maps to à and
'a maps to á.



In X, using the international or the standard US keyboard, I would like instead to set mappings like this:



a` maps to á and
a' maps to à.



As you can see, I would like the dead key to be typed after the base letter and also I prefer to swap the acute and grave accent dead keys. (This makes typing much faster and natural for me and, in case the dead key functionality is disabled, words with attached diacritics are more readable).



Can you address me to the proper tools/config files to achieve this?

In case it is relevant to the answer, my distro is Arch Linux.










share|improve this question

























  • And how would you enter a a without accent? Do you really want the typing of they're to produce theỳre? Or do you want to limit it to only a few base letters?

    – Stéphane Chazelas
    Apr 23 '18 at 14:30








  • 1





    You would have to handle this at the application level, since the a is typically already delivered to the application after it has been typed.

    – Johan Myréen
    Apr 23 '18 at 14:31











  • @JohanMyréen, one could imagine a generic handler that generates a Backspace key pressed, Backspace key released, à key pressed, à key released sequence of events when one presses ' while the last key event was for a a key.

    – Stéphane Chazelas
    Apr 23 '18 at 14:35











  • @Stéphane and then one can imagine all the edge cases which need to be handled ;-). The compose key seems like a much safer proposition...

    – Stephen Kitt
    Apr 23 '18 at 16:10











  • @StéphaneChazelas: There are no edge cases, unless you are typing maths. Accents are needed only for vowels, while apostrophes in English are used after consonants. When typing maths in technical documents, one would switch to the standard English keyboard.

    – antonio
    May 8 '18 at 17:55














2












2








2








The US International keyboard allows to add diacritics by means of dead keys.
Specifically:



`a maps to à and
'a maps to á.



In X, using the international or the standard US keyboard, I would like instead to set mappings like this:



a` maps to á and
a' maps to à.



As you can see, I would like the dead key to be typed after the base letter and also I prefer to swap the acute and grave accent dead keys. (This makes typing much faster and natural for me and, in case the dead key functionality is disabled, words with attached diacritics are more readable).



Can you address me to the proper tools/config files to achieve this?

In case it is relevant to the answer, my distro is Arch Linux.










share|improve this question
















The US International keyboard allows to add diacritics by means of dead keys.
Specifically:



`a maps to à and
'a maps to á.



In X, using the international or the standard US keyboard, I would like instead to set mappings like this:



a` maps to á and
a' maps to à.



As you can see, I would like the dead key to be typed after the base letter and also I prefer to swap the acute and grave accent dead keys. (This makes typing much faster and natural for me and, in case the dead key functionality is disabled, words with attached diacritics are more readable).



Can you address me to the proper tools/config files to achieve this?

In case it is relevant to the answer, my distro is Arch Linux.







keyboard keyboard-layout compose-key dead-keys






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 23 '18 at 14:15







antonio

















asked Apr 23 '18 at 14:09









antonioantonio

4692725




4692725













  • And how would you enter a a without accent? Do you really want the typing of they're to produce theỳre? Or do you want to limit it to only a few base letters?

    – Stéphane Chazelas
    Apr 23 '18 at 14:30








  • 1





    You would have to handle this at the application level, since the a is typically already delivered to the application after it has been typed.

    – Johan Myréen
    Apr 23 '18 at 14:31











  • @JohanMyréen, one could imagine a generic handler that generates a Backspace key pressed, Backspace key released, à key pressed, à key released sequence of events when one presses ' while the last key event was for a a key.

    – Stéphane Chazelas
    Apr 23 '18 at 14:35











  • @Stéphane and then one can imagine all the edge cases which need to be handled ;-). The compose key seems like a much safer proposition...

    – Stephen Kitt
    Apr 23 '18 at 16:10











  • @StéphaneChazelas: There are no edge cases, unless you are typing maths. Accents are needed only for vowels, while apostrophes in English are used after consonants. When typing maths in technical documents, one would switch to the standard English keyboard.

    – antonio
    May 8 '18 at 17:55



















  • And how would you enter a a without accent? Do you really want the typing of they're to produce theỳre? Or do you want to limit it to only a few base letters?

    – Stéphane Chazelas
    Apr 23 '18 at 14:30








  • 1





    You would have to handle this at the application level, since the a is typically already delivered to the application after it has been typed.

    – Johan Myréen
    Apr 23 '18 at 14:31











  • @JohanMyréen, one could imagine a generic handler that generates a Backspace key pressed, Backspace key released, à key pressed, à key released sequence of events when one presses ' while the last key event was for a a key.

    – Stéphane Chazelas
    Apr 23 '18 at 14:35











  • @Stéphane and then one can imagine all the edge cases which need to be handled ;-). The compose key seems like a much safer proposition...

    – Stephen Kitt
    Apr 23 '18 at 16:10











  • @StéphaneChazelas: There are no edge cases, unless you are typing maths. Accents are needed only for vowels, while apostrophes in English are used after consonants. When typing maths in technical documents, one would switch to the standard English keyboard.

    – antonio
    May 8 '18 at 17:55

















And how would you enter a a without accent? Do you really want the typing of they're to produce theỳre? Or do you want to limit it to only a few base letters?

– Stéphane Chazelas
Apr 23 '18 at 14:30







And how would you enter a a without accent? Do you really want the typing of they're to produce theỳre? Or do you want to limit it to only a few base letters?

– Stéphane Chazelas
Apr 23 '18 at 14:30






1




1





You would have to handle this at the application level, since the a is typically already delivered to the application after it has been typed.

– Johan Myréen
Apr 23 '18 at 14:31





You would have to handle this at the application level, since the a is typically already delivered to the application after it has been typed.

– Johan Myréen
Apr 23 '18 at 14:31













@JohanMyréen, one could imagine a generic handler that generates a Backspace key pressed, Backspace key released, à key pressed, à key released sequence of events when one presses ' while the last key event was for a a key.

– Stéphane Chazelas
Apr 23 '18 at 14:35





@JohanMyréen, one could imagine a generic handler that generates a Backspace key pressed, Backspace key released, à key pressed, à key released sequence of events when one presses ' while the last key event was for a a key.

– Stéphane Chazelas
Apr 23 '18 at 14:35













@Stéphane and then one can imagine all the edge cases which need to be handled ;-). The compose key seems like a much safer proposition...

– Stephen Kitt
Apr 23 '18 at 16:10





@Stéphane and then one can imagine all the edge cases which need to be handled ;-). The compose key seems like a much safer proposition...

– Stephen Kitt
Apr 23 '18 at 16:10













@StéphaneChazelas: There are no edge cases, unless you are typing maths. Accents are needed only for vowels, while apostrophes in English are used after consonants. When typing maths in technical documents, one would switch to the standard English keyboard.

– antonio
May 8 '18 at 17:55





@StéphaneChazelas: There are no edge cases, unless you are typing maths. Accents are needed only for vowels, while apostrophes in English are used after consonants. When typing maths in technical documents, one would switch to the standard English keyboard.

– antonio
May 8 '18 at 17:55










2 Answers
2






active

oldest

votes


















6














One option is to use Compose mode




  1. Revert to your standard keyboard, rather than the US keyboard with deadkeys

  2. Enable compose mode. I happen to like Alt Gr as my compose key


To enter a letter with a diacritic you prefix the character pair with the chosen compose key. For example, Alt Gra' results in á. And Alt Gro/ results in ø. Alt Gr < < gives «. Etc.






share|improve this answer





















  • 1





    Additionally, most .XCompose files include both AB and BA forms of the composition, so you can [Compose][a]['] or [Compose]['][a].

    – DopeGhoti
    Apr 23 '18 at 16:04



















0














No, I don’t believe there is a usable way to achieve this using “dead keys”. The other answer mentions the compose key. Well the compose key and dead keys function the exact same way, only using different mappings. Dead keys are essentially special-purpose compose keys.



The “dead key” concept is taken from typewriters where you can type for example ` without advancing the carriage, then type a over it and thus get à. The initial keypress is “dead” since the carriage stays in place.



Using letters (like a) as dead keys



There is nothing special about keysyms like Multi_key (the compose key), dead_greek, dead_circumflex, etc. You can use any keysym in your ~/.XCompose file. Thus using normal letters works perfectly fine:



<a> <grave> : "à"
<a> <acute> : "á"


The problem is that now you cannot just write a using one keystroke. You have to introduce mappings to effectively escape the “dead key”/mapping key functionality:



<a> <a> : "a"
<a> <space> : "a"


I can’t imagine that anyone would consider this a practical solution. Hence why I don’t think you can achieve what you want using compose key-style mappings.



Using combining diacritical marks



There is a way to type a + `à. You don’t even need compose key mappings. All you need to do is replace the dead keys with combining diacritical marks. These are Unicode glyphs that are meant to be combined with other glyphs. So if you want to type using this method:



a + ◌̀ → à (†1)


Some commonly used combining variants of diacritical marks:




  • ◌̀ U+0300 Combining Grave Accent

  • ◌́ U+0301 Combining Acute Accent

  • ◌̂ U+0302 Combining Circumflex Accent

  • ◌̃ U+0303 Combining Tilde

  • ◌̄ U+0304 Combining Macron


† 1: The (U+25CC DOTTED CIRCLE) is used to quote the combining diacritic mark.






share|improve this answer

























    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%2f439488%2ftyping-dead-key-after-base-letter%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









    6














    One option is to use Compose mode




    1. Revert to your standard keyboard, rather than the US keyboard with deadkeys

    2. Enable compose mode. I happen to like Alt Gr as my compose key


    To enter a letter with a diacritic you prefix the character pair with the chosen compose key. For example, Alt Gra' results in á. And Alt Gro/ results in ø. Alt Gr < < gives «. Etc.






    share|improve this answer





















    • 1





      Additionally, most .XCompose files include both AB and BA forms of the composition, so you can [Compose][a]['] or [Compose]['][a].

      – DopeGhoti
      Apr 23 '18 at 16:04
















    6














    One option is to use Compose mode




    1. Revert to your standard keyboard, rather than the US keyboard with deadkeys

    2. Enable compose mode. I happen to like Alt Gr as my compose key


    To enter a letter with a diacritic you prefix the character pair with the chosen compose key. For example, Alt Gra' results in á. And Alt Gro/ results in ø. Alt Gr < < gives «. Etc.






    share|improve this answer





















    • 1





      Additionally, most .XCompose files include both AB and BA forms of the composition, so you can [Compose][a]['] or [Compose]['][a].

      – DopeGhoti
      Apr 23 '18 at 16:04














    6












    6








    6







    One option is to use Compose mode




    1. Revert to your standard keyboard, rather than the US keyboard with deadkeys

    2. Enable compose mode. I happen to like Alt Gr as my compose key


    To enter a letter with a diacritic you prefix the character pair with the chosen compose key. For example, Alt Gra' results in á. And Alt Gro/ results in ø. Alt Gr < < gives «. Etc.






    share|improve this answer















    One option is to use Compose mode




    1. Revert to your standard keyboard, rather than the US keyboard with deadkeys

    2. Enable compose mode. I happen to like Alt Gr as my compose key


    To enter a letter with a diacritic you prefix the character pair with the chosen compose key. For example, Alt Gra' results in á. And Alt Gro/ results in ø. Alt Gr < < gives «. Etc.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Apr 24 '18 at 22:29

























    answered Apr 23 '18 at 14:22









    roaimaroaima

    45.6k757124




    45.6k757124








    • 1





      Additionally, most .XCompose files include both AB and BA forms of the composition, so you can [Compose][a]['] or [Compose]['][a].

      – DopeGhoti
      Apr 23 '18 at 16:04














    • 1





      Additionally, most .XCompose files include both AB and BA forms of the composition, so you can [Compose][a]['] or [Compose]['][a].

      – DopeGhoti
      Apr 23 '18 at 16:04








    1




    1





    Additionally, most .XCompose files include both AB and BA forms of the composition, so you can [Compose][a]['] or [Compose]['][a].

    – DopeGhoti
    Apr 23 '18 at 16:04





    Additionally, most .XCompose files include both AB and BA forms of the composition, so you can [Compose][a]['] or [Compose]['][a].

    – DopeGhoti
    Apr 23 '18 at 16:04













    0














    No, I don’t believe there is a usable way to achieve this using “dead keys”. The other answer mentions the compose key. Well the compose key and dead keys function the exact same way, only using different mappings. Dead keys are essentially special-purpose compose keys.



    The “dead key” concept is taken from typewriters where you can type for example ` without advancing the carriage, then type a over it and thus get à. The initial keypress is “dead” since the carriage stays in place.



    Using letters (like a) as dead keys



    There is nothing special about keysyms like Multi_key (the compose key), dead_greek, dead_circumflex, etc. You can use any keysym in your ~/.XCompose file. Thus using normal letters works perfectly fine:



    <a> <grave> : "à"
    <a> <acute> : "á"


    The problem is that now you cannot just write a using one keystroke. You have to introduce mappings to effectively escape the “dead key”/mapping key functionality:



    <a> <a> : "a"
    <a> <space> : "a"


    I can’t imagine that anyone would consider this a practical solution. Hence why I don’t think you can achieve what you want using compose key-style mappings.



    Using combining diacritical marks



    There is a way to type a + `à. You don’t even need compose key mappings. All you need to do is replace the dead keys with combining diacritical marks. These are Unicode glyphs that are meant to be combined with other glyphs. So if you want to type using this method:



    a + ◌̀ → à (†1)


    Some commonly used combining variants of diacritical marks:




    • ◌̀ U+0300 Combining Grave Accent

    • ◌́ U+0301 Combining Acute Accent

    • ◌̂ U+0302 Combining Circumflex Accent

    • ◌̃ U+0303 Combining Tilde

    • ◌̄ U+0304 Combining Macron


    † 1: The (U+25CC DOTTED CIRCLE) is used to quote the combining diacritic mark.






    share|improve this answer






























      0














      No, I don’t believe there is a usable way to achieve this using “dead keys”. The other answer mentions the compose key. Well the compose key and dead keys function the exact same way, only using different mappings. Dead keys are essentially special-purpose compose keys.



      The “dead key” concept is taken from typewriters where you can type for example ` without advancing the carriage, then type a over it and thus get à. The initial keypress is “dead” since the carriage stays in place.



      Using letters (like a) as dead keys



      There is nothing special about keysyms like Multi_key (the compose key), dead_greek, dead_circumflex, etc. You can use any keysym in your ~/.XCompose file. Thus using normal letters works perfectly fine:



      <a> <grave> : "à"
      <a> <acute> : "á"


      The problem is that now you cannot just write a using one keystroke. You have to introduce mappings to effectively escape the “dead key”/mapping key functionality:



      <a> <a> : "a"
      <a> <space> : "a"


      I can’t imagine that anyone would consider this a practical solution. Hence why I don’t think you can achieve what you want using compose key-style mappings.



      Using combining diacritical marks



      There is a way to type a + `à. You don’t even need compose key mappings. All you need to do is replace the dead keys with combining diacritical marks. These are Unicode glyphs that are meant to be combined with other glyphs. So if you want to type using this method:



      a + ◌̀ → à (†1)


      Some commonly used combining variants of diacritical marks:




      • ◌̀ U+0300 Combining Grave Accent

      • ◌́ U+0301 Combining Acute Accent

      • ◌̂ U+0302 Combining Circumflex Accent

      • ◌̃ U+0303 Combining Tilde

      • ◌̄ U+0304 Combining Macron


      † 1: The (U+25CC DOTTED CIRCLE) is used to quote the combining diacritic mark.






      share|improve this answer




























        0












        0








        0







        No, I don’t believe there is a usable way to achieve this using “dead keys”. The other answer mentions the compose key. Well the compose key and dead keys function the exact same way, only using different mappings. Dead keys are essentially special-purpose compose keys.



        The “dead key” concept is taken from typewriters where you can type for example ` without advancing the carriage, then type a over it and thus get à. The initial keypress is “dead” since the carriage stays in place.



        Using letters (like a) as dead keys



        There is nothing special about keysyms like Multi_key (the compose key), dead_greek, dead_circumflex, etc. You can use any keysym in your ~/.XCompose file. Thus using normal letters works perfectly fine:



        <a> <grave> : "à"
        <a> <acute> : "á"


        The problem is that now you cannot just write a using one keystroke. You have to introduce mappings to effectively escape the “dead key”/mapping key functionality:



        <a> <a> : "a"
        <a> <space> : "a"


        I can’t imagine that anyone would consider this a practical solution. Hence why I don’t think you can achieve what you want using compose key-style mappings.



        Using combining diacritical marks



        There is a way to type a + `à. You don’t even need compose key mappings. All you need to do is replace the dead keys with combining diacritical marks. These are Unicode glyphs that are meant to be combined with other glyphs. So if you want to type using this method:



        a + ◌̀ → à (†1)


        Some commonly used combining variants of diacritical marks:




        • ◌̀ U+0300 Combining Grave Accent

        • ◌́ U+0301 Combining Acute Accent

        • ◌̂ U+0302 Combining Circumflex Accent

        • ◌̃ U+0303 Combining Tilde

        • ◌̄ U+0304 Combining Macron


        † 1: The (U+25CC DOTTED CIRCLE) is used to quote the combining diacritic mark.






        share|improve this answer















        No, I don’t believe there is a usable way to achieve this using “dead keys”. The other answer mentions the compose key. Well the compose key and dead keys function the exact same way, only using different mappings. Dead keys are essentially special-purpose compose keys.



        The “dead key” concept is taken from typewriters where you can type for example ` without advancing the carriage, then type a over it and thus get à. The initial keypress is “dead” since the carriage stays in place.



        Using letters (like a) as dead keys



        There is nothing special about keysyms like Multi_key (the compose key), dead_greek, dead_circumflex, etc. You can use any keysym in your ~/.XCompose file. Thus using normal letters works perfectly fine:



        <a> <grave> : "à"
        <a> <acute> : "á"


        The problem is that now you cannot just write a using one keystroke. You have to introduce mappings to effectively escape the “dead key”/mapping key functionality:



        <a> <a> : "a"
        <a> <space> : "a"


        I can’t imagine that anyone would consider this a practical solution. Hence why I don’t think you can achieve what you want using compose key-style mappings.



        Using combining diacritical marks



        There is a way to type a + `à. You don’t even need compose key mappings. All you need to do is replace the dead keys with combining diacritical marks. These are Unicode glyphs that are meant to be combined with other glyphs. So if you want to type using this method:



        a + ◌̀ → à (†1)


        Some commonly used combining variants of diacritical marks:




        • ◌̀ U+0300 Combining Grave Accent

        • ◌́ U+0301 Combining Acute Accent

        • ◌̂ U+0302 Combining Circumflex Accent

        • ◌̃ U+0303 Combining Tilde

        • ◌̄ U+0304 Combining Macron


        † 1: The (U+25CC DOTTED CIRCLE) is used to quote the combining diacritic mark.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited 27 mins ago

























        answered 2 hours ago









        GuildensternGuildenstern

        1636




        1636






























            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%2f439488%2ftyping-dead-key-after-base-letter%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

            Histoire des bourses de valeurs

            Why is there Russian traffic in my log files?

            Rename multiple files to decrement number in file name?