I'm trying to make the Insert key on my keyboard (i know from xev that it has keycode 118) work like a ctrl key ... since my stupid keyboard does not have a ctrl key on the right, just the left.

I created this ~/.Xmodmap file:

keycode 118 = Control_R
add Control = Control_R

After I do xmodmap ~./Xmodmap (or logout/login), I can verify that the modifiers should be set

> xmodmap -pm
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69),  Control_R (0x76)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)

But! The Insert key behavior hasn't changed! Nothing's changed. Any suggestions on how to track down the problem? I'm running openSUSE 11.3 with GNOME.

With the settings as above, xev gives the following on Insert keypress:

KeyRelease event, serial 33, synthetic NO, window 0x2400001,
root 0x15d, subw 0x0, time 509578019, (168,-15), root:(173,475),
state 0x4, keycode 118 (keysym 0xffe4, Control_R), same_screen YES,
XLookupString gives 0 bytes: 
XFilterEvent returns: False
  • I shouldn't say nothing changed. The Insert key does lose the normal insert functionality...
    – Ian
    Dec 9, 2010 at 23:57
  • What does xev show when you press the Insert key after your change? What version of Xorg does your distribution have? Does it help if you do clear Control then add Control = Control_L Control_R? Dec 10, 2010 at 23:31
  • I have X.Org X Server 1.8.0. And nope, the clear and add commands you suggest didn't do it. I added the xev output to the original post. Thanks for looking at this, sorry it took me so long to get back to this machine!
    – Ian
    Dec 13, 2010 at 19:06


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.