How to disable keys from the keyboard?

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








up vote
11
down vote

favorite
3












I have a laptop with a full keyboard (it has numpad), but the laptop is not that big, and because of that the keys are relatively small, which means I am constantly finding myself pressing keys accidentally on the numpad part.



Is there a way to disable specific keys that I simply don't want?










share|improve this question



























    up vote
    11
    down vote

    favorite
    3












    I have a laptop with a full keyboard (it has numpad), but the laptop is not that big, and because of that the keys are relatively small, which means I am constantly finding myself pressing keys accidentally on the numpad part.



    Is there a way to disable specific keys that I simply don't want?










    share|improve this question

























      up vote
      11
      down vote

      favorite
      3









      up vote
      11
      down vote

      favorite
      3






      3





      I have a laptop with a full keyboard (it has numpad), but the laptop is not that big, and because of that the keys are relatively small, which means I am constantly finding myself pressing keys accidentally on the numpad part.



      Is there a way to disable specific keys that I simply don't want?










      share|improve this question















      I have a laptop with a full keyboard (it has numpad), but the laptop is not that big, and because of that the keys are relatively small, which means I am constantly finding myself pressing keys accidentally on the numpad part.



      Is there a way to disable specific keys that I simply don't want?







      keyboard






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 8 '17 at 8:48









      Zanna

      48k13119228




      48k13119228










      asked Jul 25 '11 at 6:48









      Void

      2522310




      2522310




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          10
          down vote



          accepted










          I have the Menu key very close to the Ctrl and left-arrow keys.



          xmodmap -e 'keycode 135 = 0x0000' 


          To get a first impression what keycodes are mapped to which keys, just type:



          xmodmap -pke


          which gives you a list of all mappings. For example, the line



          keycode 57 = n N


          means that the keycode 57 is mapped to a lowercase "n" if no extra key is pressed, and an uppercase "N" if Shift is held.



          Some references to get around with things.




          1. xev will let you identify the keycode for your key of interest.

            Look at its man page, This is a good quick reference too,
            Mediakeys with .Xmodmap HOWTO

          2. ArchWiki has a good description for xmodmap





          share|improve this answer






















          • what can I do to disable '/' key?
            – shravan
            Jul 19 '15 at 7:06

















          up vote
          9
          down vote













          Example to disable/enable backspace:



          # Disable
          $ xmodmap -e 'keycode 22 = '

          # Enable
          $ xmodmap -e 'keycode 22 = BackSpace'


          where 22 needs to be replaced by the output of xev while pressing backspace.






          share|improve this answer
















          • 1




            Great, thanks. I'm always hitting "Insert" by mistake when I hit the End key, and I just remapped Insert to the End function :)
            – Max Williams
            Apr 17 at 14:25










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f54417%2fhow-to-disable-keys-from-the-keyboard%23new-answer', 'question_page');

          );

          Post as a guest






























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          10
          down vote



          accepted










          I have the Menu key very close to the Ctrl and left-arrow keys.



          xmodmap -e 'keycode 135 = 0x0000' 


          To get a first impression what keycodes are mapped to which keys, just type:



          xmodmap -pke


          which gives you a list of all mappings. For example, the line



          keycode 57 = n N


          means that the keycode 57 is mapped to a lowercase "n" if no extra key is pressed, and an uppercase "N" if Shift is held.



          Some references to get around with things.




          1. xev will let you identify the keycode for your key of interest.

            Look at its man page, This is a good quick reference too,
            Mediakeys with .Xmodmap HOWTO

          2. ArchWiki has a good description for xmodmap





          share|improve this answer






















          • what can I do to disable '/' key?
            – shravan
            Jul 19 '15 at 7:06














          up vote
          10
          down vote



          accepted










          I have the Menu key very close to the Ctrl and left-arrow keys.



          xmodmap -e 'keycode 135 = 0x0000' 


          To get a first impression what keycodes are mapped to which keys, just type:



          xmodmap -pke


          which gives you a list of all mappings. For example, the line



          keycode 57 = n N


          means that the keycode 57 is mapped to a lowercase "n" if no extra key is pressed, and an uppercase "N" if Shift is held.



          Some references to get around with things.




          1. xev will let you identify the keycode for your key of interest.

            Look at its man page, This is a good quick reference too,
            Mediakeys with .Xmodmap HOWTO

          2. ArchWiki has a good description for xmodmap





          share|improve this answer






















          • what can I do to disable '/' key?
            – shravan
            Jul 19 '15 at 7:06












          up vote
          10
          down vote



          accepted







          up vote
          10
          down vote



          accepted






          I have the Menu key very close to the Ctrl and left-arrow keys.



          xmodmap -e 'keycode 135 = 0x0000' 


          To get a first impression what keycodes are mapped to which keys, just type:



          xmodmap -pke


          which gives you a list of all mappings. For example, the line



          keycode 57 = n N


          means that the keycode 57 is mapped to a lowercase "n" if no extra key is pressed, and an uppercase "N" if Shift is held.



          Some references to get around with things.




          1. xev will let you identify the keycode for your key of interest.

            Look at its man page, This is a good quick reference too,
            Mediakeys with .Xmodmap HOWTO

          2. ArchWiki has a good description for xmodmap





          share|improve this answer














          I have the Menu key very close to the Ctrl and left-arrow keys.



          xmodmap -e 'keycode 135 = 0x0000' 


          To get a first impression what keycodes are mapped to which keys, just type:



          xmodmap -pke


          which gives you a list of all mappings. For example, the line



          keycode 57 = n N


          means that the keycode 57 is mapped to a lowercase "n" if no extra key is pressed, and an uppercase "N" if Shift is held.



          Some references to get around with things.




          1. xev will let you identify the keycode for your key of interest.

            Look at its man page, This is a good quick reference too,
            Mediakeys with .Xmodmap HOWTO

          2. ArchWiki has a good description for xmodmap






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Aug 22 '16 at 14:58









          karel

          50.6k11107127




          50.6k11107127










          answered Jul 25 '11 at 7:34









          nik

          1,148716




          1,148716











          • what can I do to disable '/' key?
            – shravan
            Jul 19 '15 at 7:06
















          • what can I do to disable '/' key?
            – shravan
            Jul 19 '15 at 7:06















          what can I do to disable '/' key?
          – shravan
          Jul 19 '15 at 7:06




          what can I do to disable '/' key?
          – shravan
          Jul 19 '15 at 7:06












          up vote
          9
          down vote













          Example to disable/enable backspace:



          # Disable
          $ xmodmap -e 'keycode 22 = '

          # Enable
          $ xmodmap -e 'keycode 22 = BackSpace'


          where 22 needs to be replaced by the output of xev while pressing backspace.






          share|improve this answer
















          • 1




            Great, thanks. I'm always hitting "Insert" by mistake when I hit the End key, and I just remapped Insert to the End function :)
            – Max Williams
            Apr 17 at 14:25














          up vote
          9
          down vote













          Example to disable/enable backspace:



          # Disable
          $ xmodmap -e 'keycode 22 = '

          # Enable
          $ xmodmap -e 'keycode 22 = BackSpace'


          where 22 needs to be replaced by the output of xev while pressing backspace.






          share|improve this answer
















          • 1




            Great, thanks. I'm always hitting "Insert" by mistake when I hit the End key, and I just remapped Insert to the End function :)
            – Max Williams
            Apr 17 at 14:25












          up vote
          9
          down vote










          up vote
          9
          down vote









          Example to disable/enable backspace:



          # Disable
          $ xmodmap -e 'keycode 22 = '

          # Enable
          $ xmodmap -e 'keycode 22 = BackSpace'


          where 22 needs to be replaced by the output of xev while pressing backspace.






          share|improve this answer












          Example to disable/enable backspace:



          # Disable
          $ xmodmap -e 'keycode 22 = '

          # Enable
          $ xmodmap -e 'keycode 22 = BackSpace'


          where 22 needs to be replaced by the output of xev while pressing backspace.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 8 '17 at 8:50









          orschiro

          4,81763890




          4,81763890







          • 1




            Great, thanks. I'm always hitting "Insert" by mistake when I hit the End key, and I just remapped Insert to the End function :)
            – Max Williams
            Apr 17 at 14:25












          • 1




            Great, thanks. I'm always hitting "Insert" by mistake when I hit the End key, and I just remapped Insert to the End function :)
            – Max Williams
            Apr 17 at 14:25







          1




          1




          Great, thanks. I'm always hitting "Insert" by mistake when I hit the End key, and I just remapped Insert to the End function :)
          – Max Williams
          Apr 17 at 14:25




          Great, thanks. I'm always hitting "Insert" by mistake when I hit the End key, and I just remapped Insert to the End function :)
          – Max Williams
          Apr 17 at 14:25

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f54417%2fhow-to-disable-keys-from-the-keyboard%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          pylint3 and pip3 broken

          Missing snmpget and snmpwalk

          How to enroll fingerprints to Ubuntu 17.10 with VFS491