Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm starting to use Emacs, and as any (Emacs) user should know, you constantly use Ctrl. However, in my current layout, the right Ctrl is too far away to be used constantly, and AltGr is in the perfect position.

Is there any way to make AltGr behave as Ctrl, and be able to change that behaviour easily?

share|improve this question
up vote 1 down vote accepted

You can paste this on terminal to do the change:
xmodmap -e 'keycode 108 = Control_R' && xmodmap -e 'add Control = Control_R'

and this to undo:
xmodmap -e 'keycode 108 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift'

Also you can check the manuals of "xev" and "xmodmap" for more information.

share|improve this answer
The code to undo it works, but the change code just makes AltGr unusable. thanks anyway – gumbo Aug 11 '11 at 22:38
I think I have fixed it ;-) – desgua Aug 11 '11 at 23:53
Yes! thank you =) – gumbo Aug 12 '11 at 10:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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