How to use Mode_switch and xmodmap in current Ubuntu versions?

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








up vote
1
down vote

favorite
1












For years I used the following ~/.Xmodmap file to get german umlauts quickly, e.g. when I press the ALT_R + a I get ä. A nice shortcut compared to using the compose key:



keycode 108 = Mode_switch
keycode 38 = a A adiaeresis Adiaeresis adiaeresis Adiaeresis
keycode 30 = u U udiaeresis Udiaeresis udiaeresis Udiaeresis
keycode 32 = o O odiaeresis Odiaeresis odiaeresis Odiaeresis
keycode 39 = s S ssharp ssharp ssharp ssharp
keycode 20 = minus underscore endash endash endash endash
keycode 60 = period greater ellipsis ellipsis ellipsis ellipsis
keycode 61 = slash question emdash emdash emdash emdash


Note: I'm using the Happy Hacker Keyboard, which has no ALT_GR key. The keycode 108 is sent by the right ALT key and Mode_switch generally corresponds to the 2nd and 3rd values above.



Since 17.10 all combinations only result in a warning sound, nothing else happens. I noticed the same on Fedora 27, so maybe it's related to new xkb settings and / or Gnome Shell?



Any ideas how I can archiev this under current Gnome Shell setups?










share|improve this question

















  • 1




    Assuming you use the English (US) layout, you can create a keyboard layout variant by editing the us symbols file. This answer, which was written in response to a similar question, may provide the guidance you need.
    – Gunnar Hjalmarsson
    Feb 16 at 21:26














up vote
1
down vote

favorite
1












For years I used the following ~/.Xmodmap file to get german umlauts quickly, e.g. when I press the ALT_R + a I get ä. A nice shortcut compared to using the compose key:



keycode 108 = Mode_switch
keycode 38 = a A adiaeresis Adiaeresis adiaeresis Adiaeresis
keycode 30 = u U udiaeresis Udiaeresis udiaeresis Udiaeresis
keycode 32 = o O odiaeresis Odiaeresis odiaeresis Odiaeresis
keycode 39 = s S ssharp ssharp ssharp ssharp
keycode 20 = minus underscore endash endash endash endash
keycode 60 = period greater ellipsis ellipsis ellipsis ellipsis
keycode 61 = slash question emdash emdash emdash emdash


Note: I'm using the Happy Hacker Keyboard, which has no ALT_GR key. The keycode 108 is sent by the right ALT key and Mode_switch generally corresponds to the 2nd and 3rd values above.



Since 17.10 all combinations only result in a warning sound, nothing else happens. I noticed the same on Fedora 27, so maybe it's related to new xkb settings and / or Gnome Shell?



Any ideas how I can archiev this under current Gnome Shell setups?










share|improve this question

















  • 1




    Assuming you use the English (US) layout, you can create a keyboard layout variant by editing the us symbols file. This answer, which was written in response to a similar question, may provide the guidance you need.
    – Gunnar Hjalmarsson
    Feb 16 at 21:26












up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





For years I used the following ~/.Xmodmap file to get german umlauts quickly, e.g. when I press the ALT_R + a I get ä. A nice shortcut compared to using the compose key:



keycode 108 = Mode_switch
keycode 38 = a A adiaeresis Adiaeresis adiaeresis Adiaeresis
keycode 30 = u U udiaeresis Udiaeresis udiaeresis Udiaeresis
keycode 32 = o O odiaeresis Odiaeresis odiaeresis Odiaeresis
keycode 39 = s S ssharp ssharp ssharp ssharp
keycode 20 = minus underscore endash endash endash endash
keycode 60 = period greater ellipsis ellipsis ellipsis ellipsis
keycode 61 = slash question emdash emdash emdash emdash


Note: I'm using the Happy Hacker Keyboard, which has no ALT_GR key. The keycode 108 is sent by the right ALT key and Mode_switch generally corresponds to the 2nd and 3rd values above.



Since 17.10 all combinations only result in a warning sound, nothing else happens. I noticed the same on Fedora 27, so maybe it's related to new xkb settings and / or Gnome Shell?



Any ideas how I can archiev this under current Gnome Shell setups?










share|improve this question













For years I used the following ~/.Xmodmap file to get german umlauts quickly, e.g. when I press the ALT_R + a I get ä. A nice shortcut compared to using the compose key:



keycode 108 = Mode_switch
keycode 38 = a A adiaeresis Adiaeresis adiaeresis Adiaeresis
keycode 30 = u U udiaeresis Udiaeresis udiaeresis Udiaeresis
keycode 32 = o O odiaeresis Odiaeresis odiaeresis Odiaeresis
keycode 39 = s S ssharp ssharp ssharp ssharp
keycode 20 = minus underscore endash endash endash endash
keycode 60 = period greater ellipsis ellipsis ellipsis ellipsis
keycode 61 = slash question emdash emdash emdash emdash


Note: I'm using the Happy Hacker Keyboard, which has no ALT_GR key. The keycode 108 is sent by the right ALT key and Mode_switch generally corresponds to the 2nd and 3rd values above.



Since 17.10 all combinations only result in a warning sound, nothing else happens. I noticed the same on Fedora 27, so maybe it's related to new xkb settings and / or Gnome Shell?



Any ideas how I can archiev this under current Gnome Shell setups?







17.10 keyboard-layout gnome-shell xmodmap xkb






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 16 at 17:22









Brutus

348417




348417







  • 1




    Assuming you use the English (US) layout, you can create a keyboard layout variant by editing the us symbols file. This answer, which was written in response to a similar question, may provide the guidance you need.
    – Gunnar Hjalmarsson
    Feb 16 at 21:26












  • 1




    Assuming you use the English (US) layout, you can create a keyboard layout variant by editing the us symbols file. This answer, which was written in response to a similar question, may provide the guidance you need.
    – Gunnar Hjalmarsson
    Feb 16 at 21:26







1




1




Assuming you use the English (US) layout, you can create a keyboard layout variant by editing the us symbols file. This answer, which was written in response to a similar question, may provide the guidance you need.
– Gunnar Hjalmarsson
Feb 16 at 21:26




Assuming you use the English (US) layout, you can create a keyboard layout variant by editing the us symbols file. This answer, which was written in response to a similar question, may provide the guidance you need.
– Gunnar Hjalmarsson
Feb 16 at 21:26










1 Answer
1






active

oldest

votes

















up vote
2
down vote













Thanks to Gunnar Hjalmarsson, I found enough information in this answer. Here's what I did:



To include some new key settings, I added this to the end of /usr/share/X11/xkb/symbols/us:



partial alphanumeric_keys
xkb_symbols "us-de"

// include all the definitions from us(basic), I just want to add to it

include "us(basic)"
name[Group1]= "English (US, with german umlauts)";

// add german umlauts

key <AC01> [ a, A, adiaeresis, Adiaeresis ] ;
key <AD07> [ u, U, udiaeresis, Udiaeresis ] ;
key <AD09> [ o, O, odiaeresis, Odiaeresis ] ;
key <AC02> [ s, S, ssharp, ssharp ] ;

// and some other keys

key <AE11> [ minus, underscore, endash, endash ] ;
key <AB09> [ period, greater, ellipsis, ellipsis ] ;
key <AB10> [ slash, question, emdash, emdash ] ;

// have ALT_R as level 3 switch

include "level3(ralt_switch)"
;


And to have a variant I can select from Settings > Region & Language, I added
the following to the end of the variantList for English (US) in this XML
file /usr/share/X11/xkb/rules/evdev.xml:



<variant>
<configItem>
<name>us-de</name>
<description>English (US, with german umlauts)</description>
</configItem>
</variant>


After a sudo systemctl restart keyboard-setup.service I could select the new
layout variant from Settings > Region & Language.






share|improve this answer




















    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%2f1006856%2fhow-to-use-mode-switch-and-xmodmap-in-current-ubuntu-versions%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
    2
    down vote













    Thanks to Gunnar Hjalmarsson, I found enough information in this answer. Here's what I did:



    To include some new key settings, I added this to the end of /usr/share/X11/xkb/symbols/us:



    partial alphanumeric_keys
    xkb_symbols "us-de"

    // include all the definitions from us(basic), I just want to add to it

    include "us(basic)"
    name[Group1]= "English (US, with german umlauts)";

    // add german umlauts

    key <AC01> [ a, A, adiaeresis, Adiaeresis ] ;
    key <AD07> [ u, U, udiaeresis, Udiaeresis ] ;
    key <AD09> [ o, O, odiaeresis, Odiaeresis ] ;
    key <AC02> [ s, S, ssharp, ssharp ] ;

    // and some other keys

    key <AE11> [ minus, underscore, endash, endash ] ;
    key <AB09> [ period, greater, ellipsis, ellipsis ] ;
    key <AB10> [ slash, question, emdash, emdash ] ;

    // have ALT_R as level 3 switch

    include "level3(ralt_switch)"
    ;


    And to have a variant I can select from Settings > Region & Language, I added
    the following to the end of the variantList for English (US) in this XML
    file /usr/share/X11/xkb/rules/evdev.xml:



    <variant>
    <configItem>
    <name>us-de</name>
    <description>English (US, with german umlauts)</description>
    </configItem>
    </variant>


    After a sudo systemctl restart keyboard-setup.service I could select the new
    layout variant from Settings > Region & Language.






    share|improve this answer
























      up vote
      2
      down vote













      Thanks to Gunnar Hjalmarsson, I found enough information in this answer. Here's what I did:



      To include some new key settings, I added this to the end of /usr/share/X11/xkb/symbols/us:



      partial alphanumeric_keys
      xkb_symbols "us-de"

      // include all the definitions from us(basic), I just want to add to it

      include "us(basic)"
      name[Group1]= "English (US, with german umlauts)";

      // add german umlauts

      key <AC01> [ a, A, adiaeresis, Adiaeresis ] ;
      key <AD07> [ u, U, udiaeresis, Udiaeresis ] ;
      key <AD09> [ o, O, odiaeresis, Odiaeresis ] ;
      key <AC02> [ s, S, ssharp, ssharp ] ;

      // and some other keys

      key <AE11> [ minus, underscore, endash, endash ] ;
      key <AB09> [ period, greater, ellipsis, ellipsis ] ;
      key <AB10> [ slash, question, emdash, emdash ] ;

      // have ALT_R as level 3 switch

      include "level3(ralt_switch)"
      ;


      And to have a variant I can select from Settings > Region & Language, I added
      the following to the end of the variantList for English (US) in this XML
      file /usr/share/X11/xkb/rules/evdev.xml:



      <variant>
      <configItem>
      <name>us-de</name>
      <description>English (US, with german umlauts)</description>
      </configItem>
      </variant>


      After a sudo systemctl restart keyboard-setup.service I could select the new
      layout variant from Settings > Region & Language.






      share|improve this answer






















        up vote
        2
        down vote










        up vote
        2
        down vote









        Thanks to Gunnar Hjalmarsson, I found enough information in this answer. Here's what I did:



        To include some new key settings, I added this to the end of /usr/share/X11/xkb/symbols/us:



        partial alphanumeric_keys
        xkb_symbols "us-de"

        // include all the definitions from us(basic), I just want to add to it

        include "us(basic)"
        name[Group1]= "English (US, with german umlauts)";

        // add german umlauts

        key <AC01> [ a, A, adiaeresis, Adiaeresis ] ;
        key <AD07> [ u, U, udiaeresis, Udiaeresis ] ;
        key <AD09> [ o, O, odiaeresis, Odiaeresis ] ;
        key <AC02> [ s, S, ssharp, ssharp ] ;

        // and some other keys

        key <AE11> [ minus, underscore, endash, endash ] ;
        key <AB09> [ period, greater, ellipsis, ellipsis ] ;
        key <AB10> [ slash, question, emdash, emdash ] ;

        // have ALT_R as level 3 switch

        include "level3(ralt_switch)"
        ;


        And to have a variant I can select from Settings > Region & Language, I added
        the following to the end of the variantList for English (US) in this XML
        file /usr/share/X11/xkb/rules/evdev.xml:



        <variant>
        <configItem>
        <name>us-de</name>
        <description>English (US, with german umlauts)</description>
        </configItem>
        </variant>


        After a sudo systemctl restart keyboard-setup.service I could select the new
        layout variant from Settings > Region & Language.






        share|improve this answer












        Thanks to Gunnar Hjalmarsson, I found enough information in this answer. Here's what I did:



        To include some new key settings, I added this to the end of /usr/share/X11/xkb/symbols/us:



        partial alphanumeric_keys
        xkb_symbols "us-de"

        // include all the definitions from us(basic), I just want to add to it

        include "us(basic)"
        name[Group1]= "English (US, with german umlauts)";

        // add german umlauts

        key <AC01> [ a, A, adiaeresis, Adiaeresis ] ;
        key <AD07> [ u, U, udiaeresis, Udiaeresis ] ;
        key <AD09> [ o, O, odiaeresis, Odiaeresis ] ;
        key <AC02> [ s, S, ssharp, ssharp ] ;

        // and some other keys

        key <AE11> [ minus, underscore, endash, endash ] ;
        key <AB09> [ period, greater, ellipsis, ellipsis ] ;
        key <AB10> [ slash, question, emdash, emdash ] ;

        // have ALT_R as level 3 switch

        include "level3(ralt_switch)"
        ;


        And to have a variant I can select from Settings > Region & Language, I added
        the following to the end of the variantList for English (US) in this XML
        file /usr/share/X11/xkb/rules/evdev.xml:



        <variant>
        <configItem>
        <name>us-de</name>
        <description>English (US, with german umlauts)</description>
        </configItem>
        </variant>


        After a sudo systemctl restart keyboard-setup.service I could select the new
        layout variant from Settings > Region & Language.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 18 at 18:17









        Brutus

        348417




        348417



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1006856%2fhow-to-use-mode-switch-and-xmodmap-in-current-ubuntu-versions%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            Which professions warranted travel in Medieval times?

            How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

            Trouble downloading packages list due to a “Hash sum mismatch” error