How to remap CAPS LOCK on Wayland?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







7















Before Fedora switched to Wayland I used this .Xmodmap file to use my CapsLock Key to reach German Umlauts:



keycode 66 = Mode_switch Multi_key
keycode 20 = minus underscore ssharp
keycode 34 = bracketleft braceleft udiaeresis Udiaeresis
keycode 47 = semicolon colon odiaeresis Odiaeresis
keycode 48 = apostrophe quotedbl adiaeresis Adiaeresis


On Wayland this does not work any more - CapsLock would just work as before.



Is there a way to achieve the same result in Wayland, too?










share|improve this question





























    7















    Before Fedora switched to Wayland I used this .Xmodmap file to use my CapsLock Key to reach German Umlauts:



    keycode 66 = Mode_switch Multi_key
    keycode 20 = minus underscore ssharp
    keycode 34 = bracketleft braceleft udiaeresis Udiaeresis
    keycode 47 = semicolon colon odiaeresis Odiaeresis
    keycode 48 = apostrophe quotedbl adiaeresis Adiaeresis


    On Wayland this does not work any more - CapsLock would just work as before.



    Is there a way to achieve the same result in Wayland, too?










    share|improve this question

























      7












      7








      7


      1






      Before Fedora switched to Wayland I used this .Xmodmap file to use my CapsLock Key to reach German Umlauts:



      keycode 66 = Mode_switch Multi_key
      keycode 20 = minus underscore ssharp
      keycode 34 = bracketleft braceleft udiaeresis Udiaeresis
      keycode 47 = semicolon colon odiaeresis Odiaeresis
      keycode 48 = apostrophe quotedbl adiaeresis Adiaeresis


      On Wayland this does not work any more - CapsLock would just work as before.



      Is there a way to achieve the same result in Wayland, too?










      share|improve this question














      Before Fedora switched to Wayland I used this .Xmodmap file to use my CapsLock Key to reach German Umlauts:



      keycode 66 = Mode_switch Multi_key
      keycode 20 = minus underscore ssharp
      keycode 34 = bracketleft braceleft udiaeresis Udiaeresis
      keycode 47 = semicolon colon odiaeresis Odiaeresis
      keycode 48 = apostrophe quotedbl adiaeresis Adiaeresis


      On Wayland this does not work any more - CapsLock would just work as before.



      Is there a way to achieve the same result in Wayland, too?







      xorg keyboard-layout xmodmap wayland






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 6 '17 at 19:48









      fransfrans

      3791417




      3791417






















          3 Answers
          3






          active

          oldest

          votes


















          6














          For gnome you can use



          gsettings set org.gnome.desktop.input-sources xkb-options "['caps:ctrl_modifier']"


          While the preferred way for X is now



          setxkbmap -option caps:ctrl_modifier


          instead of xmodmap i believe. See this bugreport






          share|improve this answer



















          • 6





            Where do you find the list of codes? ie How did you know the code was ctrl_modifier?

            – Aaron Skomra
            Jun 27 '17 at 22:26






          • 2





            This doesn't seem to work on Wayland/Sway

            – djsumdog
            Feb 19 '18 at 5:45






          • 1





            @djsumdog, the trick anon gave for wayland is gnome-shell specific. sway would have to implement their own version of this setting. alot of features that were handled by X11 will have to be handled by the window manager from now on.

            – thebunnyrules
            Feb 22 '18 at 6:30











          • gsettings worked for my Arch Linux 2019.02.01, but, setxkbmap solution not working.

            – zw963
            Feb 26 at 14:17





















          0














          For sway you can use:



          export XKB_DEFAULT_OPTIONS=caps:escape


          before running:



          sway


          reference https://github.com/swaywm/sway/wiki






          share|improve this answer
























          • This has changed: there's now support for this in the config file: github.com/swaywm/sway/wiki#keyboard-layout

            – Nathan Wallace
            Jan 23 at 22:45



















          0














          For completeness: Under KWin/KDE you can remap Caps-Lock (and a few other control keys) quite flexibly using System settingsInput DevicesKeyboardAdvanced.



          In particular you can set the Key to choose the 3rd level to Caps Lock to achieve your particular configuration.



          – Much better than using Alt Gr when programming and losing Caps Lock in return is not really a loss at all.



          (Die deutsche Bezeichnung ist übrigens: SystemeinstellungenEingabegeräteTastaturErweitertTaste zum Wechsel in die dritte TastaturebeneFeststelltaste.)






          share|improve this answer
























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            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%2fsuperuser.com%2fquestions%2f1196241%2fhow-to-remap-caps-lock-on-wayland%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            6














            For gnome you can use



            gsettings set org.gnome.desktop.input-sources xkb-options "['caps:ctrl_modifier']"


            While the preferred way for X is now



            setxkbmap -option caps:ctrl_modifier


            instead of xmodmap i believe. See this bugreport






            share|improve this answer



















            • 6





              Where do you find the list of codes? ie How did you know the code was ctrl_modifier?

              – Aaron Skomra
              Jun 27 '17 at 22:26






            • 2





              This doesn't seem to work on Wayland/Sway

              – djsumdog
              Feb 19 '18 at 5:45






            • 1





              @djsumdog, the trick anon gave for wayland is gnome-shell specific. sway would have to implement their own version of this setting. alot of features that were handled by X11 will have to be handled by the window manager from now on.

              – thebunnyrules
              Feb 22 '18 at 6:30











            • gsettings worked for my Arch Linux 2019.02.01, but, setxkbmap solution not working.

              – zw963
              Feb 26 at 14:17


















            6














            For gnome you can use



            gsettings set org.gnome.desktop.input-sources xkb-options "['caps:ctrl_modifier']"


            While the preferred way for X is now



            setxkbmap -option caps:ctrl_modifier


            instead of xmodmap i believe. See this bugreport






            share|improve this answer



















            • 6





              Where do you find the list of codes? ie How did you know the code was ctrl_modifier?

              – Aaron Skomra
              Jun 27 '17 at 22:26






            • 2





              This doesn't seem to work on Wayland/Sway

              – djsumdog
              Feb 19 '18 at 5:45






            • 1





              @djsumdog, the trick anon gave for wayland is gnome-shell specific. sway would have to implement their own version of this setting. alot of features that were handled by X11 will have to be handled by the window manager from now on.

              – thebunnyrules
              Feb 22 '18 at 6:30











            • gsettings worked for my Arch Linux 2019.02.01, but, setxkbmap solution not working.

              – zw963
              Feb 26 at 14:17
















            6












            6








            6







            For gnome you can use



            gsettings set org.gnome.desktop.input-sources xkb-options "['caps:ctrl_modifier']"


            While the preferred way for X is now



            setxkbmap -option caps:ctrl_modifier


            instead of xmodmap i believe. See this bugreport






            share|improve this answer













            For gnome you can use



            gsettings set org.gnome.desktop.input-sources xkb-options "['caps:ctrl_modifier']"


            While the preferred way for X is now



            setxkbmap -option caps:ctrl_modifier


            instead of xmodmap i believe. See this bugreport







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered May 14 '17 at 14:42









            anonanon

            612




            612








            • 6





              Where do you find the list of codes? ie How did you know the code was ctrl_modifier?

              – Aaron Skomra
              Jun 27 '17 at 22:26






            • 2





              This doesn't seem to work on Wayland/Sway

              – djsumdog
              Feb 19 '18 at 5:45






            • 1





              @djsumdog, the trick anon gave for wayland is gnome-shell specific. sway would have to implement their own version of this setting. alot of features that were handled by X11 will have to be handled by the window manager from now on.

              – thebunnyrules
              Feb 22 '18 at 6:30











            • gsettings worked for my Arch Linux 2019.02.01, but, setxkbmap solution not working.

              – zw963
              Feb 26 at 14:17
















            • 6





              Where do you find the list of codes? ie How did you know the code was ctrl_modifier?

              – Aaron Skomra
              Jun 27 '17 at 22:26






            • 2





              This doesn't seem to work on Wayland/Sway

              – djsumdog
              Feb 19 '18 at 5:45






            • 1





              @djsumdog, the trick anon gave for wayland is gnome-shell specific. sway would have to implement their own version of this setting. alot of features that were handled by X11 will have to be handled by the window manager from now on.

              – thebunnyrules
              Feb 22 '18 at 6:30











            • gsettings worked for my Arch Linux 2019.02.01, but, setxkbmap solution not working.

              – zw963
              Feb 26 at 14:17










            6




            6





            Where do you find the list of codes? ie How did you know the code was ctrl_modifier?

            – Aaron Skomra
            Jun 27 '17 at 22:26





            Where do you find the list of codes? ie How did you know the code was ctrl_modifier?

            – Aaron Skomra
            Jun 27 '17 at 22:26




            2




            2





            This doesn't seem to work on Wayland/Sway

            – djsumdog
            Feb 19 '18 at 5:45





            This doesn't seem to work on Wayland/Sway

            – djsumdog
            Feb 19 '18 at 5:45




            1




            1





            @djsumdog, the trick anon gave for wayland is gnome-shell specific. sway would have to implement their own version of this setting. alot of features that were handled by X11 will have to be handled by the window manager from now on.

            – thebunnyrules
            Feb 22 '18 at 6:30





            @djsumdog, the trick anon gave for wayland is gnome-shell specific. sway would have to implement their own version of this setting. alot of features that were handled by X11 will have to be handled by the window manager from now on.

            – thebunnyrules
            Feb 22 '18 at 6:30













            gsettings worked for my Arch Linux 2019.02.01, but, setxkbmap solution not working.

            – zw963
            Feb 26 at 14:17







            gsettings worked for my Arch Linux 2019.02.01, but, setxkbmap solution not working.

            – zw963
            Feb 26 at 14:17















            0














            For sway you can use:



            export XKB_DEFAULT_OPTIONS=caps:escape


            before running:



            sway


            reference https://github.com/swaywm/sway/wiki






            share|improve this answer
























            • This has changed: there's now support for this in the config file: github.com/swaywm/sway/wiki#keyboard-layout

              – Nathan Wallace
              Jan 23 at 22:45
















            0














            For sway you can use:



            export XKB_DEFAULT_OPTIONS=caps:escape


            before running:



            sway


            reference https://github.com/swaywm/sway/wiki






            share|improve this answer
























            • This has changed: there's now support for this in the config file: github.com/swaywm/sway/wiki#keyboard-layout

              – Nathan Wallace
              Jan 23 at 22:45














            0












            0








            0







            For sway you can use:



            export XKB_DEFAULT_OPTIONS=caps:escape


            before running:



            sway


            reference https://github.com/swaywm/sway/wiki






            share|improve this answer













            For sway you can use:



            export XKB_DEFAULT_OPTIONS=caps:escape


            before running:



            sway


            reference https://github.com/swaywm/sway/wiki







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Sep 6 '18 at 16:22









            Neil BillinghamNeil Billingham

            1011




            1011













            • This has changed: there's now support for this in the config file: github.com/swaywm/sway/wiki#keyboard-layout

              – Nathan Wallace
              Jan 23 at 22:45



















            • This has changed: there's now support for this in the config file: github.com/swaywm/sway/wiki#keyboard-layout

              – Nathan Wallace
              Jan 23 at 22:45

















            This has changed: there's now support for this in the config file: github.com/swaywm/sway/wiki#keyboard-layout

            – Nathan Wallace
            Jan 23 at 22:45





            This has changed: there's now support for this in the config file: github.com/swaywm/sway/wiki#keyboard-layout

            – Nathan Wallace
            Jan 23 at 22:45











            0














            For completeness: Under KWin/KDE you can remap Caps-Lock (and a few other control keys) quite flexibly using System settingsInput DevicesKeyboardAdvanced.



            In particular you can set the Key to choose the 3rd level to Caps Lock to achieve your particular configuration.



            – Much better than using Alt Gr when programming and losing Caps Lock in return is not really a loss at all.



            (Die deutsche Bezeichnung ist übrigens: SystemeinstellungenEingabegeräteTastaturErweitertTaste zum Wechsel in die dritte TastaturebeneFeststelltaste.)






            share|improve this answer




























              0














              For completeness: Under KWin/KDE you can remap Caps-Lock (and a few other control keys) quite flexibly using System settingsInput DevicesKeyboardAdvanced.



              In particular you can set the Key to choose the 3rd level to Caps Lock to achieve your particular configuration.



              – Much better than using Alt Gr when programming and losing Caps Lock in return is not really a loss at all.



              (Die deutsche Bezeichnung ist übrigens: SystemeinstellungenEingabegeräteTastaturErweitertTaste zum Wechsel in die dritte TastaturebeneFeststelltaste.)






              share|improve this answer


























                0












                0








                0







                For completeness: Under KWin/KDE you can remap Caps-Lock (and a few other control keys) quite flexibly using System settingsInput DevicesKeyboardAdvanced.



                In particular you can set the Key to choose the 3rd level to Caps Lock to achieve your particular configuration.



                – Much better than using Alt Gr when programming and losing Caps Lock in return is not really a loss at all.



                (Die deutsche Bezeichnung ist übrigens: SystemeinstellungenEingabegeräteTastaturErweitertTaste zum Wechsel in die dritte TastaturebeneFeststelltaste.)






                share|improve this answer













                For completeness: Under KWin/KDE you can remap Caps-Lock (and a few other control keys) quite flexibly using System settingsInput DevicesKeyboardAdvanced.



                In particular you can set the Key to choose the 3rd level to Caps Lock to achieve your particular configuration.



                – Much better than using Alt Gr when programming and losing Caps Lock in return is not really a loss at all.



                (Die deutsche Bezeichnung ist übrigens: SystemeinstellungenEingabegeräteTastaturErweitertTaste zum Wechsel in die dritte TastaturebeneFeststelltaste.)







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 5 at 14:31









                ntninjantninja

                20014




                20014






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • 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%2fsuperuser.com%2fquestions%2f1196241%2fhow-to-remap-caps-lock-on-wayland%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

                    Plaza Victoria

                    Brian Clough

                    Cáceres