Turn off Caps lock when Escape is pressed

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












10















Is there any way to disable CapsLock whenever Esc is pressed. Yes, I use VIM! I actually have an alternative all-caps keyboard layout on Ctrl-6 but I find it cumbersome and would prefer to just have the OS disable CapsLock whenever Esc is pressed. Also, I often SSH into other servers for a few hours so I'm on a stock VIM there.



Note that I happen to already have swapped the CapsLock and Esc keys. However, when the Esc key is pressed (which happens to be labeled CapsLock on the keyboard and is next to A), I need it to perform both Escape and Disable-CapsLock-If-It-Is-Enabled.



This is on Kubuntu 12.10. Thanks.










share|improve this question
























  • You need to add that functionality only for vim, or the complete desktop?

    – mtk
    Jan 14 '13 at 16:02











  • I would like it to be a desktop feature.

    – dotancohen
    Jan 14 '13 at 19:04















10















Is there any way to disable CapsLock whenever Esc is pressed. Yes, I use VIM! I actually have an alternative all-caps keyboard layout on Ctrl-6 but I find it cumbersome and would prefer to just have the OS disable CapsLock whenever Esc is pressed. Also, I often SSH into other servers for a few hours so I'm on a stock VIM there.



Note that I happen to already have swapped the CapsLock and Esc keys. However, when the Esc key is pressed (which happens to be labeled CapsLock on the keyboard and is next to A), I need it to perform both Escape and Disable-CapsLock-If-It-Is-Enabled.



This is on Kubuntu 12.10. Thanks.










share|improve this question
























  • You need to add that functionality only for vim, or the complete desktop?

    – mtk
    Jan 14 '13 at 16:02











  • I would like it to be a desktop feature.

    – dotancohen
    Jan 14 '13 at 19:04













10












10








10


4






Is there any way to disable CapsLock whenever Esc is pressed. Yes, I use VIM! I actually have an alternative all-caps keyboard layout on Ctrl-6 but I find it cumbersome and would prefer to just have the OS disable CapsLock whenever Esc is pressed. Also, I often SSH into other servers for a few hours so I'm on a stock VIM there.



Note that I happen to already have swapped the CapsLock and Esc keys. However, when the Esc key is pressed (which happens to be labeled CapsLock on the keyboard and is next to A), I need it to perform both Escape and Disable-CapsLock-If-It-Is-Enabled.



This is on Kubuntu 12.10. Thanks.










share|improve this question
















Is there any way to disable CapsLock whenever Esc is pressed. Yes, I use VIM! I actually have an alternative all-caps keyboard layout on Ctrl-6 but I find it cumbersome and would prefer to just have the OS disable CapsLock whenever Esc is pressed. Also, I often SSH into other servers for a few hours so I'm on a stock VIM there.



Note that I happen to already have swapped the CapsLock and Esc keys. However, when the Esc key is pressed (which happens to be labeled CapsLock on the keyboard and is next to A), I need it to perform both Escape and Disable-CapsLock-If-It-Is-Enabled.



This is on Kubuntu 12.10. Thanks.







keyboard xkb kubuntu






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 21 '13 at 22:17









Pablo Saratxaga

1,6581015




1,6581015










asked Jan 14 '13 at 12:03









dotancohendotancohen

6,271195796




6,271195796












  • You need to add that functionality only for vim, or the complete desktop?

    – mtk
    Jan 14 '13 at 16:02











  • I would like it to be a desktop feature.

    – dotancohen
    Jan 14 '13 at 19:04

















  • You need to add that functionality only for vim, or the complete desktop?

    – mtk
    Jan 14 '13 at 16:02











  • I would like it to be a desktop feature.

    – dotancohen
    Jan 14 '13 at 19:04
















You need to add that functionality only for vim, or the complete desktop?

– mtk
Jan 14 '13 at 16:02





You need to add that functionality only for vim, or the complete desktop?

– mtk
Jan 14 '13 at 16:02













I would like it to be a desktop feature.

– dotancohen
Jan 14 '13 at 19:04





I would like it to be a desktop feature.

– dotancohen
Jan 14 '13 at 19:04










3 Answers
3






active

oldest

votes


















5





+50









In X11 (on console I don't know) you can do it by redefining the behaviour of the Escape key.
I looked at the "shift(break_caps)" definition to see how it works, and adapted it.



Look at this answer on xkb for more details on how/where to put the locally modified files and load them.



And for doing what you want, you need in the local symbols file (eg: ~/.xkb/symbols/mysymbols) a section like this:



partial modifier_keys
xkb_symbols "esc_breaks_caps"
key <ESC>
type = "ALPHABETIC",
actions [Group1] = [
SetMods(modifiers=none),
SetMods(modifiers=Lock,clearLocks)
]
;
;


and in the local keymap file (eg: ~/.xkb/keymap/mykbd; you can create it with setxkbmap -print > ~/.xkb/keymap/mykbd ) change the xkb_symbols line to add +mysymbols(esc_breaks_caps).



You can now load it with: xkbcomp -I$HOME/.xkb ~/.xkb/keymap/mykbd $DISPLAY
and pressing Esc will remove the CapsLock state (actually, the effect happens on the release of Esc; I think that only modifiers keys have immediate effect; others the effect is after their release.)



Oh, if you want to also swap Escape and CapsLock keys; then use this instead (and you put "+mysymbols(esc_swap_and_breaks_caps)" in your mykbd file):



partial modifier_keys
xkb_symbols "esc_swap_and_breaks_caps"
replace key <CAPS>
type = "ALPHABETIC",
symbols = [ Escape, Escape ],
actions [Group1] = [
SetMods(modifiers=none),
SetMods(modifiers=Lock,clearLocks)
]
;
replace key <ESC> [ CapsLock, CapsLock ] ;
;


note the physical keys are <CAPS> and <ESC>; <CAPS> (key engraved CapsLock in your keyboard) send Escape and <ESC> (key engraved Esc) sends CapsLock, whith <CAPS> (sending Escape) also unsetting capslock state






share|improve this answer
































    1














    Add these lines to ~/.Xmodmap :



    clear lock
    keycode 0x42 = Escape


    Then, type the command:



    xmodmap ~/.Xmodmap


    Your Caps Lock key is now remapped to the Esc key.



    Reference url.




    Also go through this nice article about Mapping CapsLock to Escape in Ubuntu, which seems to be a unix.se user :)






    share|improve this answer























    • Thank you. I happen to already have swapped CapsLock and Esc. However, when the Esc key is pressed (which happens to be labeled CapsLock on the keyboard and is next to A), I need it to perform both Escape and Disable-CapsLock-If-It-Is-Enabled. I will edit the question to clarify. Thanks.

      – dotancohen
      Feb 20 '13 at 10:32











    • I thought you needed the other-way round. Somewhat confused here. What happens on pressing Esc and Capslocks after these changes ?

      – mtk
      Feb 20 '13 at 11:57












    • Currently: when pressing the ESC key the CapsLock function toggles, and when pressing the CapsLock key the ESC command is sent (i.e. the ESC key is remapped to CapsLock and the CapsLock key is remapped to ESC). My goal with this question is to have pressing the CapsLock key perform both the ESC function (which it currently does) and turn off the CapsLock function if and only if the CapsLock function is enabled (i.e. not toggle the CapsLock function, but rather disable it if CapsLock is enabled).

      – dotancohen
      Feb 20 '13 at 12:43


















    1














    I'm not sure if this answers your question, but to map the Esc function to the CapsLock key, you can use this:



    setxkbmap -option "caps:escape"





    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%2f61242%2fturn-off-caps-lock-when-escape-is-pressed%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









      5





      +50









      In X11 (on console I don't know) you can do it by redefining the behaviour of the Escape key.
      I looked at the "shift(break_caps)" definition to see how it works, and adapted it.



      Look at this answer on xkb for more details on how/where to put the locally modified files and load them.



      And for doing what you want, you need in the local symbols file (eg: ~/.xkb/symbols/mysymbols) a section like this:



      partial modifier_keys
      xkb_symbols "esc_breaks_caps"
      key <ESC>
      type = "ALPHABETIC",
      actions [Group1] = [
      SetMods(modifiers=none),
      SetMods(modifiers=Lock,clearLocks)
      ]
      ;
      ;


      and in the local keymap file (eg: ~/.xkb/keymap/mykbd; you can create it with setxkbmap -print > ~/.xkb/keymap/mykbd ) change the xkb_symbols line to add +mysymbols(esc_breaks_caps).



      You can now load it with: xkbcomp -I$HOME/.xkb ~/.xkb/keymap/mykbd $DISPLAY
      and pressing Esc will remove the CapsLock state (actually, the effect happens on the release of Esc; I think that only modifiers keys have immediate effect; others the effect is after their release.)



      Oh, if you want to also swap Escape and CapsLock keys; then use this instead (and you put "+mysymbols(esc_swap_and_breaks_caps)" in your mykbd file):



      partial modifier_keys
      xkb_symbols "esc_swap_and_breaks_caps"
      replace key <CAPS>
      type = "ALPHABETIC",
      symbols = [ Escape, Escape ],
      actions [Group1] = [
      SetMods(modifiers=none),
      SetMods(modifiers=Lock,clearLocks)
      ]
      ;
      replace key <ESC> [ CapsLock, CapsLock ] ;
      ;


      note the physical keys are <CAPS> and <ESC>; <CAPS> (key engraved CapsLock in your keyboard) send Escape and <ESC> (key engraved Esc) sends CapsLock, whith <CAPS> (sending Escape) also unsetting capslock state






      share|improve this answer





























        5





        +50









        In X11 (on console I don't know) you can do it by redefining the behaviour of the Escape key.
        I looked at the "shift(break_caps)" definition to see how it works, and adapted it.



        Look at this answer on xkb for more details on how/where to put the locally modified files and load them.



        And for doing what you want, you need in the local symbols file (eg: ~/.xkb/symbols/mysymbols) a section like this:



        partial modifier_keys
        xkb_symbols "esc_breaks_caps"
        key <ESC>
        type = "ALPHABETIC",
        actions [Group1] = [
        SetMods(modifiers=none),
        SetMods(modifiers=Lock,clearLocks)
        ]
        ;
        ;


        and in the local keymap file (eg: ~/.xkb/keymap/mykbd; you can create it with setxkbmap -print > ~/.xkb/keymap/mykbd ) change the xkb_symbols line to add +mysymbols(esc_breaks_caps).



        You can now load it with: xkbcomp -I$HOME/.xkb ~/.xkb/keymap/mykbd $DISPLAY
        and pressing Esc will remove the CapsLock state (actually, the effect happens on the release of Esc; I think that only modifiers keys have immediate effect; others the effect is after their release.)



        Oh, if you want to also swap Escape and CapsLock keys; then use this instead (and you put "+mysymbols(esc_swap_and_breaks_caps)" in your mykbd file):



        partial modifier_keys
        xkb_symbols "esc_swap_and_breaks_caps"
        replace key <CAPS>
        type = "ALPHABETIC",
        symbols = [ Escape, Escape ],
        actions [Group1] = [
        SetMods(modifiers=none),
        SetMods(modifiers=Lock,clearLocks)
        ]
        ;
        replace key <ESC> [ CapsLock, CapsLock ] ;
        ;


        note the physical keys are <CAPS> and <ESC>; <CAPS> (key engraved CapsLock in your keyboard) send Escape and <ESC> (key engraved Esc) sends CapsLock, whith <CAPS> (sending Escape) also unsetting capslock state






        share|improve this answer



























          5





          +50







          5





          +50



          5




          +50





          In X11 (on console I don't know) you can do it by redefining the behaviour of the Escape key.
          I looked at the "shift(break_caps)" definition to see how it works, and adapted it.



          Look at this answer on xkb for more details on how/where to put the locally modified files and load them.



          And for doing what you want, you need in the local symbols file (eg: ~/.xkb/symbols/mysymbols) a section like this:



          partial modifier_keys
          xkb_symbols "esc_breaks_caps"
          key <ESC>
          type = "ALPHABETIC",
          actions [Group1] = [
          SetMods(modifiers=none),
          SetMods(modifiers=Lock,clearLocks)
          ]
          ;
          ;


          and in the local keymap file (eg: ~/.xkb/keymap/mykbd; you can create it with setxkbmap -print > ~/.xkb/keymap/mykbd ) change the xkb_symbols line to add +mysymbols(esc_breaks_caps).



          You can now load it with: xkbcomp -I$HOME/.xkb ~/.xkb/keymap/mykbd $DISPLAY
          and pressing Esc will remove the CapsLock state (actually, the effect happens on the release of Esc; I think that only modifiers keys have immediate effect; others the effect is after their release.)



          Oh, if you want to also swap Escape and CapsLock keys; then use this instead (and you put "+mysymbols(esc_swap_and_breaks_caps)" in your mykbd file):



          partial modifier_keys
          xkb_symbols "esc_swap_and_breaks_caps"
          replace key <CAPS>
          type = "ALPHABETIC",
          symbols = [ Escape, Escape ],
          actions [Group1] = [
          SetMods(modifiers=none),
          SetMods(modifiers=Lock,clearLocks)
          ]
          ;
          replace key <ESC> [ CapsLock, CapsLock ] ;
          ;


          note the physical keys are <CAPS> and <ESC>; <CAPS> (key engraved CapsLock in your keyboard) send Escape and <ESC> (key engraved Esc) sends CapsLock, whith <CAPS> (sending Escape) also unsetting capslock state






          share|improve this answer















          In X11 (on console I don't know) you can do it by redefining the behaviour of the Escape key.
          I looked at the "shift(break_caps)" definition to see how it works, and adapted it.



          Look at this answer on xkb for more details on how/where to put the locally modified files and load them.



          And for doing what you want, you need in the local symbols file (eg: ~/.xkb/symbols/mysymbols) a section like this:



          partial modifier_keys
          xkb_symbols "esc_breaks_caps"
          key <ESC>
          type = "ALPHABETIC",
          actions [Group1] = [
          SetMods(modifiers=none),
          SetMods(modifiers=Lock,clearLocks)
          ]
          ;
          ;


          and in the local keymap file (eg: ~/.xkb/keymap/mykbd; you can create it with setxkbmap -print > ~/.xkb/keymap/mykbd ) change the xkb_symbols line to add +mysymbols(esc_breaks_caps).



          You can now load it with: xkbcomp -I$HOME/.xkb ~/.xkb/keymap/mykbd $DISPLAY
          and pressing Esc will remove the CapsLock state (actually, the effect happens on the release of Esc; I think that only modifiers keys have immediate effect; others the effect is after their release.)



          Oh, if you want to also swap Escape and CapsLock keys; then use this instead (and you put "+mysymbols(esc_swap_and_breaks_caps)" in your mykbd file):



          partial modifier_keys
          xkb_symbols "esc_swap_and_breaks_caps"
          replace key <CAPS>
          type = "ALPHABETIC",
          symbols = [ Escape, Escape ],
          actions [Group1] = [
          SetMods(modifiers=none),
          SetMods(modifiers=Lock,clearLocks)
          ]
          ;
          replace key <ESC> [ CapsLock, CapsLock ] ;
          ;


          note the physical keys are <CAPS> and <ESC>; <CAPS> (key engraved CapsLock in your keyboard) send Escape and <ESC> (key engraved Esc) sends CapsLock, whith <CAPS> (sending Escape) also unsetting capslock state







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 31 '18 at 19:38









          adantj

          1034




          1034










          answered Feb 21 '13 at 15:18









          Pablo SaratxagaPablo Saratxaga

          1,6581015




          1,6581015























              1














              Add these lines to ~/.Xmodmap :



              clear lock
              keycode 0x42 = Escape


              Then, type the command:



              xmodmap ~/.Xmodmap


              Your Caps Lock key is now remapped to the Esc key.



              Reference url.




              Also go through this nice article about Mapping CapsLock to Escape in Ubuntu, which seems to be a unix.se user :)






              share|improve this answer























              • Thank you. I happen to already have swapped CapsLock and Esc. However, when the Esc key is pressed (which happens to be labeled CapsLock on the keyboard and is next to A), I need it to perform both Escape and Disable-CapsLock-If-It-Is-Enabled. I will edit the question to clarify. Thanks.

                – dotancohen
                Feb 20 '13 at 10:32











              • I thought you needed the other-way round. Somewhat confused here. What happens on pressing Esc and Capslocks after these changes ?

                – mtk
                Feb 20 '13 at 11:57












              • Currently: when pressing the ESC key the CapsLock function toggles, and when pressing the CapsLock key the ESC command is sent (i.e. the ESC key is remapped to CapsLock and the CapsLock key is remapped to ESC). My goal with this question is to have pressing the CapsLock key perform both the ESC function (which it currently does) and turn off the CapsLock function if and only if the CapsLock function is enabled (i.e. not toggle the CapsLock function, but rather disable it if CapsLock is enabled).

                – dotancohen
                Feb 20 '13 at 12:43















              1














              Add these lines to ~/.Xmodmap :



              clear lock
              keycode 0x42 = Escape


              Then, type the command:



              xmodmap ~/.Xmodmap


              Your Caps Lock key is now remapped to the Esc key.



              Reference url.




              Also go through this nice article about Mapping CapsLock to Escape in Ubuntu, which seems to be a unix.se user :)






              share|improve this answer























              • Thank you. I happen to already have swapped CapsLock and Esc. However, when the Esc key is pressed (which happens to be labeled CapsLock on the keyboard and is next to A), I need it to perform both Escape and Disable-CapsLock-If-It-Is-Enabled. I will edit the question to clarify. Thanks.

                – dotancohen
                Feb 20 '13 at 10:32











              • I thought you needed the other-way round. Somewhat confused here. What happens on pressing Esc and Capslocks after these changes ?

                – mtk
                Feb 20 '13 at 11:57












              • Currently: when pressing the ESC key the CapsLock function toggles, and when pressing the CapsLock key the ESC command is sent (i.e. the ESC key is remapped to CapsLock and the CapsLock key is remapped to ESC). My goal with this question is to have pressing the CapsLock key perform both the ESC function (which it currently does) and turn off the CapsLock function if and only if the CapsLock function is enabled (i.e. not toggle the CapsLock function, but rather disable it if CapsLock is enabled).

                – dotancohen
                Feb 20 '13 at 12:43













              1












              1








              1







              Add these lines to ~/.Xmodmap :



              clear lock
              keycode 0x42 = Escape


              Then, type the command:



              xmodmap ~/.Xmodmap


              Your Caps Lock key is now remapped to the Esc key.



              Reference url.




              Also go through this nice article about Mapping CapsLock to Escape in Ubuntu, which seems to be a unix.se user :)






              share|improve this answer













              Add these lines to ~/.Xmodmap :



              clear lock
              keycode 0x42 = Escape


              Then, type the command:



              xmodmap ~/.Xmodmap


              Your Caps Lock key is now remapped to the Esc key.



              Reference url.




              Also go through this nice article about Mapping CapsLock to Escape in Ubuntu, which seems to be a unix.se user :)







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Feb 20 '13 at 9:55









              mtkmtk

              8,1232762103




              8,1232762103












              • Thank you. I happen to already have swapped CapsLock and Esc. However, when the Esc key is pressed (which happens to be labeled CapsLock on the keyboard and is next to A), I need it to perform both Escape and Disable-CapsLock-If-It-Is-Enabled. I will edit the question to clarify. Thanks.

                – dotancohen
                Feb 20 '13 at 10:32











              • I thought you needed the other-way round. Somewhat confused here. What happens on pressing Esc and Capslocks after these changes ?

                – mtk
                Feb 20 '13 at 11:57












              • Currently: when pressing the ESC key the CapsLock function toggles, and when pressing the CapsLock key the ESC command is sent (i.e. the ESC key is remapped to CapsLock and the CapsLock key is remapped to ESC). My goal with this question is to have pressing the CapsLock key perform both the ESC function (which it currently does) and turn off the CapsLock function if and only if the CapsLock function is enabled (i.e. not toggle the CapsLock function, but rather disable it if CapsLock is enabled).

                – dotancohen
                Feb 20 '13 at 12:43

















              • Thank you. I happen to already have swapped CapsLock and Esc. However, when the Esc key is pressed (which happens to be labeled CapsLock on the keyboard and is next to A), I need it to perform both Escape and Disable-CapsLock-If-It-Is-Enabled. I will edit the question to clarify. Thanks.

                – dotancohen
                Feb 20 '13 at 10:32











              • I thought you needed the other-way round. Somewhat confused here. What happens on pressing Esc and Capslocks after these changes ?

                – mtk
                Feb 20 '13 at 11:57












              • Currently: when pressing the ESC key the CapsLock function toggles, and when pressing the CapsLock key the ESC command is sent (i.e. the ESC key is remapped to CapsLock and the CapsLock key is remapped to ESC). My goal with this question is to have pressing the CapsLock key perform both the ESC function (which it currently does) and turn off the CapsLock function if and only if the CapsLock function is enabled (i.e. not toggle the CapsLock function, but rather disable it if CapsLock is enabled).

                – dotancohen
                Feb 20 '13 at 12:43
















              Thank you. I happen to already have swapped CapsLock and Esc. However, when the Esc key is pressed (which happens to be labeled CapsLock on the keyboard and is next to A), I need it to perform both Escape and Disable-CapsLock-If-It-Is-Enabled. I will edit the question to clarify. Thanks.

              – dotancohen
              Feb 20 '13 at 10:32





              Thank you. I happen to already have swapped CapsLock and Esc. However, when the Esc key is pressed (which happens to be labeled CapsLock on the keyboard and is next to A), I need it to perform both Escape and Disable-CapsLock-If-It-Is-Enabled. I will edit the question to clarify. Thanks.

              – dotancohen
              Feb 20 '13 at 10:32













              I thought you needed the other-way round. Somewhat confused here. What happens on pressing Esc and Capslocks after these changes ?

              – mtk
              Feb 20 '13 at 11:57






              I thought you needed the other-way round. Somewhat confused here. What happens on pressing Esc and Capslocks after these changes ?

              – mtk
              Feb 20 '13 at 11:57














              Currently: when pressing the ESC key the CapsLock function toggles, and when pressing the CapsLock key the ESC command is sent (i.e. the ESC key is remapped to CapsLock and the CapsLock key is remapped to ESC). My goal with this question is to have pressing the CapsLock key perform both the ESC function (which it currently does) and turn off the CapsLock function if and only if the CapsLock function is enabled (i.e. not toggle the CapsLock function, but rather disable it if CapsLock is enabled).

              – dotancohen
              Feb 20 '13 at 12:43





              Currently: when pressing the ESC key the CapsLock function toggles, and when pressing the CapsLock key the ESC command is sent (i.e. the ESC key is remapped to CapsLock and the CapsLock key is remapped to ESC). My goal with this question is to have pressing the CapsLock key perform both the ESC function (which it currently does) and turn off the CapsLock function if and only if the CapsLock function is enabled (i.e. not toggle the CapsLock function, but rather disable it if CapsLock is enabled).

              – dotancohen
              Feb 20 '13 at 12:43











              1














              I'm not sure if this answers your question, but to map the Esc function to the CapsLock key, you can use this:



              setxkbmap -option "caps:escape"





              share|improve this answer



























                1














                I'm not sure if this answers your question, but to map the Esc function to the CapsLock key, you can use this:



                setxkbmap -option "caps:escape"





                share|improve this answer

























                  1












                  1








                  1







                  I'm not sure if this answers your question, but to map the Esc function to the CapsLock key, you can use this:



                  setxkbmap -option "caps:escape"





                  share|improve this answer













                  I'm not sure if this answers your question, but to map the Esc function to the CapsLock key, you can use this:



                  setxkbmap -option "caps:escape"






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 21 '13 at 15:57







                  user13742


































                      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%2f61242%2fturn-off-caps-lock-when-escape-is-pressed%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

                      How to check contact read email or not when send email to Individual?

                      Bahrain

                      Postfix configuration issue with fips on centos 7; mailgun relay