I have a Kinesis Advantage keyboard and I'm trying to make it so that my right and left Alt keys do the same thing. Currently the left Alt key works as expected but the right Alt key just allows me to type foreign characters.

I found the following answer to another question to be very helpful, but I can't get similar results. Here's what I see when I type xmodmap:

$ xmodmap
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  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)

In my case I don't have an Alt_R key mapped to any of my mod keys. When that's the case what should I do?

  • What does xmodmap show after you run setxkbmap -option? – wurtel Apr 29 '15 at 6:51
  • The output of xmodmap doesn't change after executing setxkbmap -option – Tom Purl Apr 30 '15 at 2:03

You need to make the AltGr key send the Alt_R or Meta_R keysym, and to associate these keysyms with the Alt modifier (which for you is mod1). Put the following lines in your .Xmodmap file (assuming a PC keyboard):

keycode 108 = Alt_R Meta_R
add Mod1 = Alt_L Alt_R Meta_L Meta_R

That's if you want to configure this manually. There's probably an XKB option to do what you want — pick a US non-international layout, for example.

| improve this answer | |
  • Thanks a bunch! I added those two lines to the bottom of my .Xmodmap file and now my right alt key is finally doing what I want. I also tried just changing my keyboard config to Generic 101-key PC but that didn't fix it (using the keyboard-configuration package on Debian). – Tom Purl May 3 '15 at 3:49

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.