swapping keys in a virtual terminal












1














Note: I asked this question in superuser about a month ago, but there hasn't been a reply till then, and the question relates to linux, so I'm posting it here.



I want to swap esc and caps_lock keys on my keyboard. setxkbmap -option caps:swapescape gets the job done but only for X. The keys behave in original way on a virtual console. How can I make them behave in the required way on a vc?










share|improve this question



























    1














    Note: I asked this question in superuser about a month ago, but there hasn't been a reply till then, and the question relates to linux, so I'm posting it here.



    I want to swap esc and caps_lock keys on my keyboard. setxkbmap -option caps:swapescape gets the job done but only for X. The keys behave in original way on a virtual console. How can I make them behave in the required way on a vc?










    share|improve this question

























      1












      1








      1







      Note: I asked this question in superuser about a month ago, but there hasn't been a reply till then, and the question relates to linux, so I'm posting it here.



      I want to swap esc and caps_lock keys on my keyboard. setxkbmap -option caps:swapescape gets the job done but only for X. The keys behave in original way on a virtual console. How can I make them behave in the required way on a vc?










      share|improve this question













      Note: I asked this question in superuser about a month ago, but there hasn't been a reply till then, and the question relates to linux, so I'm posting it here.



      I want to swap esc and caps_lock keys on my keyboard. setxkbmap -option caps:swapescape gets the job done but only for X. The keys behave in original way on a virtual console. How can I make them behave in the required way on a vc?







      linux keyboard-shortcuts keyboard






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 28 '16 at 19:43









      saga

      786220




      786220






















          2 Answers
          2






          active

          oldest

          votes


















          1














          Use loadkeys.



          To swap Esc and Caps Lock in the console, run



          printf 'keycode 1 = Caps_Lock Caps_Locknkeycode 58 = Escape Escapen' | sudo loadkeys -





          share|improve this answer





















          • Is it ok to set the sticky bit on loadkeys, so that I can put it in login script. Or shall I make another executable which calls loadkeys and set sticky bit on that.
            – saga
            Nov 29 '16 at 11:19












          • @Saga: Add saga ALL = NOPASSWD: /usr/local/bin/swap-esc-tab to /etc/sudoers (use e.g. EDITOR=nano visudo to edit the file with nano), create root-executable shell script /usr/local/bin/swap-esc-tab that runs the command shown in my answer, and finally add sudo /usr/local/bin/swap-esc-tab to your login script.
            – Nominal Animal
            Nov 29 '16 at 20:49










          • Note that when I have lots of such scripts, I tend to put the scripts that require root in /usr/local/admin-bin/, with simple exec sudo /usr/local/admin-bin/command "$@" wrapper bash/dash scripts in /usr/local/bin/, and add nominal-animal ALL = NOPASSWD: /usr/local/admin-bin/* to /etc/sudoers, so I can run those scripts as a normal user, only acquiring root for those specific scripts.
            – Nominal Animal
            Nov 29 '16 at 20:55










          • Nice setup, I think I'll do the same.
            – saga
            Nov 30 '16 at 4:38



















          2














          Debian and console-setup



          On Debian Linux and Debian FreeBSD, the design is for the X server and the kernel virtual terminals to share one set of configuration information. The console-setup package provides tools and startup scripts that take the keyboard/font configuration of the X server, convert it, and use it to configure the kernel virtual terminals.



          Specifically: The console-setup service invokes the setupcon --save command, which generates scripts in /etc/console-setup containing the converted keyboard and font setup instructions, which are run against the kernel virtual terminal devices by udev rules. The keyboard map is converted from XKB to loadkeys format by ckbcomp, and the generated script invoked from the udev rule runs loadkeys.



          So on Debian Linux and Debian FreeBSD you need to ensure that your XKBMODEL, XKBLAYOUT, XKBVARIANT, XKBOPTIONS variables are properly set in /etc/default/keyboard. In your case in particular you need to ensure that the XKBOPTIONS variable has caps:swapescape. Then you need to ensure that you have the console-setup package properly installed.



          systemd Linux



          On systemd operating systems, things are somewhat less integrated than on Debian. There's a configuration file named /etc/vconsole.conf and a service named systemd-vconsole-setup.service that processes it at system bootstrap (in response to a udev rule announcing the existence of the kernel virtual terminal subsystem). But this isn't joined up with the X server configuration at all.



          The vconsole.conf file has a KEYMAP setting denoting the keyboard map that is passed to loadkeys, which again one does not need to explicitly run oneself. But it's left entirely up to you to create a (customized) keyboard map that swaps Caps Lock and Escape and put it where loadkeys can find it.



          To get more joined up settings, one has to involve another two services, systemd-localed and the Desktop Bus. One runs, say,


          localectl set-x11-keymap pl pc105 "" "caps:swapescape"
          and the locale D-BUS service goes and rewrites /etc/vconsole.conf with its best guess as to the nearest equivalent map for the kernel virtual terminal. This nearest equivalent may not be exactly equivalent, though, and you may find it just outright ignoring options and suchlike.

          Of course, you could always alternatively use Debian's ckbcomp by hand to directly convert an XKB keyboard map. ☺



          Further reading




          • https://superuser.com/questions/709616/

          • https://wiki.debian.org/Keyboard


          • systemd-vconsole-setup-service. systemd manual pages. Freedesktop.org.


          • vconsole.conf. systemd manual pages. Freedesktop.org.

          • Karsten Hilbert (2014-08-29). console-setup w/ systemd forgets font setting. #759657. Debian bug tracker.


          • localectl. systemd manual pages. Freedesktop.org.

          • https://unix.stackexchange.com/a/479720/5132






          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%2f326651%2fswapping-keys-in-a-virtual-terminal%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














            Use loadkeys.



            To swap Esc and Caps Lock in the console, run



            printf 'keycode 1 = Caps_Lock Caps_Locknkeycode 58 = Escape Escapen' | sudo loadkeys -





            share|improve this answer





















            • Is it ok to set the sticky bit on loadkeys, so that I can put it in login script. Or shall I make another executable which calls loadkeys and set sticky bit on that.
              – saga
              Nov 29 '16 at 11:19












            • @Saga: Add saga ALL = NOPASSWD: /usr/local/bin/swap-esc-tab to /etc/sudoers (use e.g. EDITOR=nano visudo to edit the file with nano), create root-executable shell script /usr/local/bin/swap-esc-tab that runs the command shown in my answer, and finally add sudo /usr/local/bin/swap-esc-tab to your login script.
              – Nominal Animal
              Nov 29 '16 at 20:49










            • Note that when I have lots of such scripts, I tend to put the scripts that require root in /usr/local/admin-bin/, with simple exec sudo /usr/local/admin-bin/command "$@" wrapper bash/dash scripts in /usr/local/bin/, and add nominal-animal ALL = NOPASSWD: /usr/local/admin-bin/* to /etc/sudoers, so I can run those scripts as a normal user, only acquiring root for those specific scripts.
              – Nominal Animal
              Nov 29 '16 at 20:55










            • Nice setup, I think I'll do the same.
              – saga
              Nov 30 '16 at 4:38
















            1














            Use loadkeys.



            To swap Esc and Caps Lock in the console, run



            printf 'keycode 1 = Caps_Lock Caps_Locknkeycode 58 = Escape Escapen' | sudo loadkeys -





            share|improve this answer





















            • Is it ok to set the sticky bit on loadkeys, so that I can put it in login script. Or shall I make another executable which calls loadkeys and set sticky bit on that.
              – saga
              Nov 29 '16 at 11:19












            • @Saga: Add saga ALL = NOPASSWD: /usr/local/bin/swap-esc-tab to /etc/sudoers (use e.g. EDITOR=nano visudo to edit the file with nano), create root-executable shell script /usr/local/bin/swap-esc-tab that runs the command shown in my answer, and finally add sudo /usr/local/bin/swap-esc-tab to your login script.
              – Nominal Animal
              Nov 29 '16 at 20:49










            • Note that when I have lots of such scripts, I tend to put the scripts that require root in /usr/local/admin-bin/, with simple exec sudo /usr/local/admin-bin/command "$@" wrapper bash/dash scripts in /usr/local/bin/, and add nominal-animal ALL = NOPASSWD: /usr/local/admin-bin/* to /etc/sudoers, so I can run those scripts as a normal user, only acquiring root for those specific scripts.
              – Nominal Animal
              Nov 29 '16 at 20:55










            • Nice setup, I think I'll do the same.
              – saga
              Nov 30 '16 at 4:38














            1












            1








            1






            Use loadkeys.



            To swap Esc and Caps Lock in the console, run



            printf 'keycode 1 = Caps_Lock Caps_Locknkeycode 58 = Escape Escapen' | sudo loadkeys -





            share|improve this answer












            Use loadkeys.



            To swap Esc and Caps Lock in the console, run



            printf 'keycode 1 = Caps_Lock Caps_Locknkeycode 58 = Escape Escapen' | sudo loadkeys -






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 28 '16 at 21:24









            Nominal Animal

            2,830812




            2,830812












            • Is it ok to set the sticky bit on loadkeys, so that I can put it in login script. Or shall I make another executable which calls loadkeys and set sticky bit on that.
              – saga
              Nov 29 '16 at 11:19












            • @Saga: Add saga ALL = NOPASSWD: /usr/local/bin/swap-esc-tab to /etc/sudoers (use e.g. EDITOR=nano visudo to edit the file with nano), create root-executable shell script /usr/local/bin/swap-esc-tab that runs the command shown in my answer, and finally add sudo /usr/local/bin/swap-esc-tab to your login script.
              – Nominal Animal
              Nov 29 '16 at 20:49










            • Note that when I have lots of such scripts, I tend to put the scripts that require root in /usr/local/admin-bin/, with simple exec sudo /usr/local/admin-bin/command "$@" wrapper bash/dash scripts in /usr/local/bin/, and add nominal-animal ALL = NOPASSWD: /usr/local/admin-bin/* to /etc/sudoers, so I can run those scripts as a normal user, only acquiring root for those specific scripts.
              – Nominal Animal
              Nov 29 '16 at 20:55










            • Nice setup, I think I'll do the same.
              – saga
              Nov 30 '16 at 4:38


















            • Is it ok to set the sticky bit on loadkeys, so that I can put it in login script. Or shall I make another executable which calls loadkeys and set sticky bit on that.
              – saga
              Nov 29 '16 at 11:19












            • @Saga: Add saga ALL = NOPASSWD: /usr/local/bin/swap-esc-tab to /etc/sudoers (use e.g. EDITOR=nano visudo to edit the file with nano), create root-executable shell script /usr/local/bin/swap-esc-tab that runs the command shown in my answer, and finally add sudo /usr/local/bin/swap-esc-tab to your login script.
              – Nominal Animal
              Nov 29 '16 at 20:49










            • Note that when I have lots of such scripts, I tend to put the scripts that require root in /usr/local/admin-bin/, with simple exec sudo /usr/local/admin-bin/command "$@" wrapper bash/dash scripts in /usr/local/bin/, and add nominal-animal ALL = NOPASSWD: /usr/local/admin-bin/* to /etc/sudoers, so I can run those scripts as a normal user, only acquiring root for those specific scripts.
              – Nominal Animal
              Nov 29 '16 at 20:55










            • Nice setup, I think I'll do the same.
              – saga
              Nov 30 '16 at 4:38
















            Is it ok to set the sticky bit on loadkeys, so that I can put it in login script. Or shall I make another executable which calls loadkeys and set sticky bit on that.
            – saga
            Nov 29 '16 at 11:19






            Is it ok to set the sticky bit on loadkeys, so that I can put it in login script. Or shall I make another executable which calls loadkeys and set sticky bit on that.
            – saga
            Nov 29 '16 at 11:19














            @Saga: Add saga ALL = NOPASSWD: /usr/local/bin/swap-esc-tab to /etc/sudoers (use e.g. EDITOR=nano visudo to edit the file with nano), create root-executable shell script /usr/local/bin/swap-esc-tab that runs the command shown in my answer, and finally add sudo /usr/local/bin/swap-esc-tab to your login script.
            – Nominal Animal
            Nov 29 '16 at 20:49




            @Saga: Add saga ALL = NOPASSWD: /usr/local/bin/swap-esc-tab to /etc/sudoers (use e.g. EDITOR=nano visudo to edit the file with nano), create root-executable shell script /usr/local/bin/swap-esc-tab that runs the command shown in my answer, and finally add sudo /usr/local/bin/swap-esc-tab to your login script.
            – Nominal Animal
            Nov 29 '16 at 20:49












            Note that when I have lots of such scripts, I tend to put the scripts that require root in /usr/local/admin-bin/, with simple exec sudo /usr/local/admin-bin/command "$@" wrapper bash/dash scripts in /usr/local/bin/, and add nominal-animal ALL = NOPASSWD: /usr/local/admin-bin/* to /etc/sudoers, so I can run those scripts as a normal user, only acquiring root for those specific scripts.
            – Nominal Animal
            Nov 29 '16 at 20:55




            Note that when I have lots of such scripts, I tend to put the scripts that require root in /usr/local/admin-bin/, with simple exec sudo /usr/local/admin-bin/command "$@" wrapper bash/dash scripts in /usr/local/bin/, and add nominal-animal ALL = NOPASSWD: /usr/local/admin-bin/* to /etc/sudoers, so I can run those scripts as a normal user, only acquiring root for those specific scripts.
            – Nominal Animal
            Nov 29 '16 at 20:55












            Nice setup, I think I'll do the same.
            – saga
            Nov 30 '16 at 4:38




            Nice setup, I think I'll do the same.
            – saga
            Nov 30 '16 at 4:38













            2














            Debian and console-setup



            On Debian Linux and Debian FreeBSD, the design is for the X server and the kernel virtual terminals to share one set of configuration information. The console-setup package provides tools and startup scripts that take the keyboard/font configuration of the X server, convert it, and use it to configure the kernel virtual terminals.



            Specifically: The console-setup service invokes the setupcon --save command, which generates scripts in /etc/console-setup containing the converted keyboard and font setup instructions, which are run against the kernel virtual terminal devices by udev rules. The keyboard map is converted from XKB to loadkeys format by ckbcomp, and the generated script invoked from the udev rule runs loadkeys.



            So on Debian Linux and Debian FreeBSD you need to ensure that your XKBMODEL, XKBLAYOUT, XKBVARIANT, XKBOPTIONS variables are properly set in /etc/default/keyboard. In your case in particular you need to ensure that the XKBOPTIONS variable has caps:swapescape. Then you need to ensure that you have the console-setup package properly installed.



            systemd Linux



            On systemd operating systems, things are somewhat less integrated than on Debian. There's a configuration file named /etc/vconsole.conf and a service named systemd-vconsole-setup.service that processes it at system bootstrap (in response to a udev rule announcing the existence of the kernel virtual terminal subsystem). But this isn't joined up with the X server configuration at all.



            The vconsole.conf file has a KEYMAP setting denoting the keyboard map that is passed to loadkeys, which again one does not need to explicitly run oneself. But it's left entirely up to you to create a (customized) keyboard map that swaps Caps Lock and Escape and put it where loadkeys can find it.



            To get more joined up settings, one has to involve another two services, systemd-localed and the Desktop Bus. One runs, say,


            localectl set-x11-keymap pl pc105 "" "caps:swapescape"
            and the locale D-BUS service goes and rewrites /etc/vconsole.conf with its best guess as to the nearest equivalent map for the kernel virtual terminal. This nearest equivalent may not be exactly equivalent, though, and you may find it just outright ignoring options and suchlike.

            Of course, you could always alternatively use Debian's ckbcomp by hand to directly convert an XKB keyboard map. ☺



            Further reading




            • https://superuser.com/questions/709616/

            • https://wiki.debian.org/Keyboard


            • systemd-vconsole-setup-service. systemd manual pages. Freedesktop.org.


            • vconsole.conf. systemd manual pages. Freedesktop.org.

            • Karsten Hilbert (2014-08-29). console-setup w/ systemd forgets font setting. #759657. Debian bug tracker.


            • localectl. systemd manual pages. Freedesktop.org.

            • https://unix.stackexchange.com/a/479720/5132






            share|improve this answer




























              2














              Debian and console-setup



              On Debian Linux and Debian FreeBSD, the design is for the X server and the kernel virtual terminals to share one set of configuration information. The console-setup package provides tools and startup scripts that take the keyboard/font configuration of the X server, convert it, and use it to configure the kernel virtual terminals.



              Specifically: The console-setup service invokes the setupcon --save command, which generates scripts in /etc/console-setup containing the converted keyboard and font setup instructions, which are run against the kernel virtual terminal devices by udev rules. The keyboard map is converted from XKB to loadkeys format by ckbcomp, and the generated script invoked from the udev rule runs loadkeys.



              So on Debian Linux and Debian FreeBSD you need to ensure that your XKBMODEL, XKBLAYOUT, XKBVARIANT, XKBOPTIONS variables are properly set in /etc/default/keyboard. In your case in particular you need to ensure that the XKBOPTIONS variable has caps:swapescape. Then you need to ensure that you have the console-setup package properly installed.



              systemd Linux



              On systemd operating systems, things are somewhat less integrated than on Debian. There's a configuration file named /etc/vconsole.conf and a service named systemd-vconsole-setup.service that processes it at system bootstrap (in response to a udev rule announcing the existence of the kernel virtual terminal subsystem). But this isn't joined up with the X server configuration at all.



              The vconsole.conf file has a KEYMAP setting denoting the keyboard map that is passed to loadkeys, which again one does not need to explicitly run oneself. But it's left entirely up to you to create a (customized) keyboard map that swaps Caps Lock and Escape and put it where loadkeys can find it.



              To get more joined up settings, one has to involve another two services, systemd-localed and the Desktop Bus. One runs, say,


              localectl set-x11-keymap pl pc105 "" "caps:swapescape"
              and the locale D-BUS service goes and rewrites /etc/vconsole.conf with its best guess as to the nearest equivalent map for the kernel virtual terminal. This nearest equivalent may not be exactly equivalent, though, and you may find it just outright ignoring options and suchlike.

              Of course, you could always alternatively use Debian's ckbcomp by hand to directly convert an XKB keyboard map. ☺



              Further reading




              • https://superuser.com/questions/709616/

              • https://wiki.debian.org/Keyboard


              • systemd-vconsole-setup-service. systemd manual pages. Freedesktop.org.


              • vconsole.conf. systemd manual pages. Freedesktop.org.

              • Karsten Hilbert (2014-08-29). console-setup w/ systemd forgets font setting. #759657. Debian bug tracker.


              • localectl. systemd manual pages. Freedesktop.org.

              • https://unix.stackexchange.com/a/479720/5132






              share|improve this answer


























                2












                2








                2






                Debian and console-setup



                On Debian Linux and Debian FreeBSD, the design is for the X server and the kernel virtual terminals to share one set of configuration information. The console-setup package provides tools and startup scripts that take the keyboard/font configuration of the X server, convert it, and use it to configure the kernel virtual terminals.



                Specifically: The console-setup service invokes the setupcon --save command, which generates scripts in /etc/console-setup containing the converted keyboard and font setup instructions, which are run against the kernel virtual terminal devices by udev rules. The keyboard map is converted from XKB to loadkeys format by ckbcomp, and the generated script invoked from the udev rule runs loadkeys.



                So on Debian Linux and Debian FreeBSD you need to ensure that your XKBMODEL, XKBLAYOUT, XKBVARIANT, XKBOPTIONS variables are properly set in /etc/default/keyboard. In your case in particular you need to ensure that the XKBOPTIONS variable has caps:swapescape. Then you need to ensure that you have the console-setup package properly installed.



                systemd Linux



                On systemd operating systems, things are somewhat less integrated than on Debian. There's a configuration file named /etc/vconsole.conf and a service named systemd-vconsole-setup.service that processes it at system bootstrap (in response to a udev rule announcing the existence of the kernel virtual terminal subsystem). But this isn't joined up with the X server configuration at all.



                The vconsole.conf file has a KEYMAP setting denoting the keyboard map that is passed to loadkeys, which again one does not need to explicitly run oneself. But it's left entirely up to you to create a (customized) keyboard map that swaps Caps Lock and Escape and put it where loadkeys can find it.



                To get more joined up settings, one has to involve another two services, systemd-localed and the Desktop Bus. One runs, say,


                localectl set-x11-keymap pl pc105 "" "caps:swapescape"
                and the locale D-BUS service goes and rewrites /etc/vconsole.conf with its best guess as to the nearest equivalent map for the kernel virtual terminal. This nearest equivalent may not be exactly equivalent, though, and you may find it just outright ignoring options and suchlike.

                Of course, you could always alternatively use Debian's ckbcomp by hand to directly convert an XKB keyboard map. ☺



                Further reading




                • https://superuser.com/questions/709616/

                • https://wiki.debian.org/Keyboard


                • systemd-vconsole-setup-service. systemd manual pages. Freedesktop.org.


                • vconsole.conf. systemd manual pages. Freedesktop.org.

                • Karsten Hilbert (2014-08-29). console-setup w/ systemd forgets font setting. #759657. Debian bug tracker.


                • localectl. systemd manual pages. Freedesktop.org.

                • https://unix.stackexchange.com/a/479720/5132






                share|improve this answer














                Debian and console-setup



                On Debian Linux and Debian FreeBSD, the design is for the X server and the kernel virtual terminals to share one set of configuration information. The console-setup package provides tools and startup scripts that take the keyboard/font configuration of the X server, convert it, and use it to configure the kernel virtual terminals.



                Specifically: The console-setup service invokes the setupcon --save command, which generates scripts in /etc/console-setup containing the converted keyboard and font setup instructions, which are run against the kernel virtual terminal devices by udev rules. The keyboard map is converted from XKB to loadkeys format by ckbcomp, and the generated script invoked from the udev rule runs loadkeys.



                So on Debian Linux and Debian FreeBSD you need to ensure that your XKBMODEL, XKBLAYOUT, XKBVARIANT, XKBOPTIONS variables are properly set in /etc/default/keyboard. In your case in particular you need to ensure that the XKBOPTIONS variable has caps:swapescape. Then you need to ensure that you have the console-setup package properly installed.



                systemd Linux



                On systemd operating systems, things are somewhat less integrated than on Debian. There's a configuration file named /etc/vconsole.conf and a service named systemd-vconsole-setup.service that processes it at system bootstrap (in response to a udev rule announcing the existence of the kernel virtual terminal subsystem). But this isn't joined up with the X server configuration at all.



                The vconsole.conf file has a KEYMAP setting denoting the keyboard map that is passed to loadkeys, which again one does not need to explicitly run oneself. But it's left entirely up to you to create a (customized) keyboard map that swaps Caps Lock and Escape and put it where loadkeys can find it.



                To get more joined up settings, one has to involve another two services, systemd-localed and the Desktop Bus. One runs, say,


                localectl set-x11-keymap pl pc105 "" "caps:swapescape"
                and the locale D-BUS service goes and rewrites /etc/vconsole.conf with its best guess as to the nearest equivalent map for the kernel virtual terminal. This nearest equivalent may not be exactly equivalent, though, and you may find it just outright ignoring options and suchlike.

                Of course, you could always alternatively use Debian's ckbcomp by hand to directly convert an XKB keyboard map. ☺



                Further reading




                • https://superuser.com/questions/709616/

                • https://wiki.debian.org/Keyboard


                • systemd-vconsole-setup-service. systemd manual pages. Freedesktop.org.


                • vconsole.conf. systemd manual pages. Freedesktop.org.

                • Karsten Hilbert (2014-08-29). console-setup w/ systemd forgets font setting. #759657. Debian bug tracker.


                • localectl. systemd manual pages. Freedesktop.org.

                • https://unix.stackexchange.com/a/479720/5132







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Dec 13 at 12:01

























                answered Nov 29 '16 at 13:39









                JdeBP

                33.1k468156




                33.1k468156






























                    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.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • 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%2f326651%2fswapping-keys-in-a-virtual-terminal%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

                    Morgemoulin

                    Scott Moir

                    Souastre