Howto to set AltGr key with xmodmap












7















I use a us-intl with "AltGr dead keys" layout and the option to switch Alt and Win key. Nice, but my AltGr does not work. The key I want to use for AltGr has keycode 134 (found out using xev). So I create a .Xmodmap file:



keycode 134 = ISO_Level3_Shift Multi_key ISO_Level3_Shift Multi_key


than I execute "xmodmap .Xmodmap". When I now show my modifier, I get:



> xmodmap
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):

shift Shift_L (0x32), Shift_R (0x3e)
lock
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x85), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x40), Super_R (0x6c), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), ISO_Level3_Shift (0x86), Mode_switch (0xcb)


But ... pressing AltGr (the key with code 134=0x86) + q does not give the expected result - which would be "a-umlaut".
It should! xmodmap -pke contains this line:



keycode  24 = q Q q Q adiaeresis Adiaeresis adiaeresi


So what is wrong and what can I do?










share|improve this question





























    7















    I use a us-intl with "AltGr dead keys" layout and the option to switch Alt and Win key. Nice, but my AltGr does not work. The key I want to use for AltGr has keycode 134 (found out using xev). So I create a .Xmodmap file:



    keycode 134 = ISO_Level3_Shift Multi_key ISO_Level3_Shift Multi_key


    than I execute "xmodmap .Xmodmap". When I now show my modifier, I get:



    > xmodmap
    xmodmap: up to 4 keys per modifier, (keycodes in parentheses):

    shift Shift_L (0x32), Shift_R (0x3e)
    lock
    control Control_L (0x25), Control_R (0x69)
    mod1 Alt_L (0x85), Meta_L (0xcd)
    mod2 Num_Lock (0x4d)
    mod3
    mod4 Super_L (0x40), Super_R (0x6c), Super_L (0xce), Hyper_L (0xcf)
    mod5 ISO_Level3_Shift (0x5c), ISO_Level3_Shift (0x86), Mode_switch (0xcb)


    But ... pressing AltGr (the key with code 134=0x86) + q does not give the expected result - which would be "a-umlaut".
    It should! xmodmap -pke contains this line:



    keycode  24 = q Q q Q adiaeresis Adiaeresis adiaeresi


    So what is wrong and what can I do?










    share|improve this question



























      7












      7








      7








      I use a us-intl with "AltGr dead keys" layout and the option to switch Alt and Win key. Nice, but my AltGr does not work. The key I want to use for AltGr has keycode 134 (found out using xev). So I create a .Xmodmap file:



      keycode 134 = ISO_Level3_Shift Multi_key ISO_Level3_Shift Multi_key


      than I execute "xmodmap .Xmodmap". When I now show my modifier, I get:



      > xmodmap
      xmodmap: up to 4 keys per modifier, (keycodes in parentheses):

      shift Shift_L (0x32), Shift_R (0x3e)
      lock
      control Control_L (0x25), Control_R (0x69)
      mod1 Alt_L (0x85), Meta_L (0xcd)
      mod2 Num_Lock (0x4d)
      mod3
      mod4 Super_L (0x40), Super_R (0x6c), Super_L (0xce), Hyper_L (0xcf)
      mod5 ISO_Level3_Shift (0x5c), ISO_Level3_Shift (0x86), Mode_switch (0xcb)


      But ... pressing AltGr (the key with code 134=0x86) + q does not give the expected result - which would be "a-umlaut".
      It should! xmodmap -pke contains this line:



      keycode  24 = q Q q Q adiaeresis Adiaeresis adiaeresi


      So what is wrong and what can I do?










      share|improve this question
















      I use a us-intl with "AltGr dead keys" layout and the option to switch Alt and Win key. Nice, but my AltGr does not work. The key I want to use for AltGr has keycode 134 (found out using xev). So I create a .Xmodmap file:



      keycode 134 = ISO_Level3_Shift Multi_key ISO_Level3_Shift Multi_key


      than I execute "xmodmap .Xmodmap". When I now show my modifier, I get:



      > xmodmap
      xmodmap: up to 4 keys per modifier, (keycodes in parentheses):

      shift Shift_L (0x32), Shift_R (0x3e)
      lock
      control Control_L (0x25), Control_R (0x69)
      mod1 Alt_L (0x85), Meta_L (0xcd)
      mod2 Num_Lock (0x4d)
      mod3
      mod4 Super_L (0x40), Super_R (0x6c), Super_L (0xce), Hyper_L (0xcf)
      mod5 ISO_Level3_Shift (0x5c), ISO_Level3_Shift (0x86), Mode_switch (0xcb)


      But ... pressing AltGr (the key with code 134=0x86) + q does not give the expected result - which would be "a-umlaut".
      It should! xmodmap -pke contains this line:



      keycode  24 = q Q q Q adiaeresis Adiaeresis adiaeresi


      So what is wrong and what can I do?







      keyboard-layout xmodmap






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 5 at 2:28









      TDK

      25013




      25013










      asked Jul 14 '14 at 10:48









      NathanNathan

      175213




      175213






















          1 Answer
          1






          active

          oldest

          votes


















          4














          According to the Xmodmap Manual, when you want to swap or change modifier keys you need to remove & clear their ties to their original keycodes and modifier groups. Then after assigning them to a new keycode you must also assign them to a new, unique group.



          It looks like (this seem to be fairly common due to manufacturer configs) modifier group 5 has been assigned two different modifiers [Level3_shift] & [Mode_switch]! In effect, pressing one of them, activates/sends them both to the system. Each of them is designed to provide access to a unique layer/level of the keyboard, as well as an additional unique layer/level when pressed together.
          [Mode_switch] is apparently synonymous with [AltGr] providing access to layer 2- the second set of [q] & [Q] in your example, [ISO_Level3_shift] provides access to level three- the [ä] & [Ä] in your example- but you can't type either of those keys without typing both until you change your .xmodmap file. And your second "adiaeresi" (sic.) is missing the final [s] so it wouldn't produce any character.



          I know this rather confusing and convoluted for no apparent reason, plus this thread is old. But hopefully someone will find my explanation useful at some point!






          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',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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%2faskubuntu.com%2fquestions%2f497565%2fhowto-to-set-altgr-key-with-xmodmap%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            4














            According to the Xmodmap Manual, when you want to swap or change modifier keys you need to remove & clear their ties to their original keycodes and modifier groups. Then after assigning them to a new keycode you must also assign them to a new, unique group.



            It looks like (this seem to be fairly common due to manufacturer configs) modifier group 5 has been assigned two different modifiers [Level3_shift] & [Mode_switch]! In effect, pressing one of them, activates/sends them both to the system. Each of them is designed to provide access to a unique layer/level of the keyboard, as well as an additional unique layer/level when pressed together.
            [Mode_switch] is apparently synonymous with [AltGr] providing access to layer 2- the second set of [q] & [Q] in your example, [ISO_Level3_shift] provides access to level three- the [ä] & [Ä] in your example- but you can't type either of those keys without typing both until you change your .xmodmap file. And your second "adiaeresi" (sic.) is missing the final [s] so it wouldn't produce any character.



            I know this rather confusing and convoluted for no apparent reason, plus this thread is old. But hopefully someone will find my explanation useful at some point!






            share|improve this answer




























              4














              According to the Xmodmap Manual, when you want to swap or change modifier keys you need to remove & clear their ties to their original keycodes and modifier groups. Then after assigning them to a new keycode you must also assign them to a new, unique group.



              It looks like (this seem to be fairly common due to manufacturer configs) modifier group 5 has been assigned two different modifiers [Level3_shift] & [Mode_switch]! In effect, pressing one of them, activates/sends them both to the system. Each of them is designed to provide access to a unique layer/level of the keyboard, as well as an additional unique layer/level when pressed together.
              [Mode_switch] is apparently synonymous with [AltGr] providing access to layer 2- the second set of [q] & [Q] in your example, [ISO_Level3_shift] provides access to level three- the [ä] & [Ä] in your example- but you can't type either of those keys without typing both until you change your .xmodmap file. And your second "adiaeresi" (sic.) is missing the final [s] so it wouldn't produce any character.



              I know this rather confusing and convoluted for no apparent reason, plus this thread is old. But hopefully someone will find my explanation useful at some point!






              share|improve this answer


























                4












                4








                4







                According to the Xmodmap Manual, when you want to swap or change modifier keys you need to remove & clear their ties to their original keycodes and modifier groups. Then after assigning them to a new keycode you must also assign them to a new, unique group.



                It looks like (this seem to be fairly common due to manufacturer configs) modifier group 5 has been assigned two different modifiers [Level3_shift] & [Mode_switch]! In effect, pressing one of them, activates/sends them both to the system. Each of them is designed to provide access to a unique layer/level of the keyboard, as well as an additional unique layer/level when pressed together.
                [Mode_switch] is apparently synonymous with [AltGr] providing access to layer 2- the second set of [q] & [Q] in your example, [ISO_Level3_shift] provides access to level three- the [ä] & [Ä] in your example- but you can't type either of those keys without typing both until you change your .xmodmap file. And your second "adiaeresi" (sic.) is missing the final [s] so it wouldn't produce any character.



                I know this rather confusing and convoluted for no apparent reason, plus this thread is old. But hopefully someone will find my explanation useful at some point!






                share|improve this answer













                According to the Xmodmap Manual, when you want to swap or change modifier keys you need to remove & clear their ties to their original keycodes and modifier groups. Then after assigning them to a new keycode you must also assign them to a new, unique group.



                It looks like (this seem to be fairly common due to manufacturer configs) modifier group 5 has been assigned two different modifiers [Level3_shift] & [Mode_switch]! In effect, pressing one of them, activates/sends them both to the system. Each of them is designed to provide access to a unique layer/level of the keyboard, as well as an additional unique layer/level when pressed together.
                [Mode_switch] is apparently synonymous with [AltGr] providing access to layer 2- the second set of [q] & [Q] in your example, [ISO_Level3_shift] provides access to level three- the [ä] & [Ä] in your example- but you can't type either of those keys without typing both until you change your .xmodmap file. And your second "adiaeresi" (sic.) is missing the final [s] so it wouldn't produce any character.



                I know this rather confusing and convoluted for no apparent reason, plus this thread is old. But hopefully someone will find my explanation useful at some point!







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 24 '17 at 5:54









                AuralArchAuralArch

                413




                413






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • 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%2faskubuntu.com%2fquestions%2f497565%2fhowto-to-set-altgr-key-with-xmodmap%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

                    flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                    Mangá

                    Eduardo VII do Reino Unido