41

I keep hitting the Insert key accidentally and it really annoys me.

Is there any way to disable it's default behavior, toggling insert/overwrite mode in editors?

Volker Siegel
  • 12,820
  • 5
  • 48
  • 65
Jorge Guberte
  • 533
  • 1
  • 5
  • 6

3 Answers3

37

Go to Keyboard Shortcuts in System settings, then press Add button and insert a Name of your choice, say "DisableIns", and true as a harmless command then press Apply button.

Now, in the Custom Shortcuts section you will find an entry

DisableIns | Disabled

Click on Disabled, then perform your custom shortcut Ins. Press close, you're done.

hans-t
  • 1,142
  • 2
  • 9
  • 17
enzotib
  • 92,255
  • 11
  • 164
  • 178
9

I'm not sure it is the "right" way, but in my tests I could disable the behaviour of Insert using the following command:

$ xmodmap -e "keycode 118 ="

If this works for you, you could put the assignment in a file ~/.Xmodmap, i.e.

keycode 118 =

which should be loaded automatically at login. See questions here and here for more information about local xmodmap configuration.

1

Type sudo nautilus in Terminal. Then go to /usr/share/X11/xkb/symbols and open pc. Then change this line:

key  <INS> {    [  Insert       ]   };

to

key  <INS> {    [  XF86Send     ]   };// Insert

Then run this:

sudo dpkg-reconfigure xkb-data

in Terminal and restart Ubuntu.

This will replace Insert with Send. You can replace it with any other appropriate key. To see a list of keys run this:

xmodmap -pke

Note: A mistake in editing pc. eg inserting an inappropriate character, may corrupt Ubuntu.

Minimus Heximus
  • 3,568
  • 9
  • 36
  • 60