Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

1 Answer 1

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.