Super User is a question and answer site for computer enthusiasts and power users. 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 am on archlinux and trying to swap the left Alt key with the left Ctrl key for my convenience in emacs as well as bash command line editing. I use the following ~/.xmodmap:

remove mod1 = Alt_L
remove control = Control_L
keycode 37 = Alt_L
keycode 64 = Control_L
add mod1 = Control_L
add control = Alt_L

For some unclear reason to me, although xev output shows that indeed the two keys are swapped, no application actually uses the new bindings. Can someone enlighten me?

share|improve this question

migrated from Apr 30 '11 at 17:08

This question came from our site for professional and enthusiast programmers.

I removed lines 3 and 4 and the problem is solved. All I needed to do is just remove the key from its original modifier and rebind it to the desired one. By swapping the keycodes I effectively rebound the each key to its original modifier. How silly of me! – stk Apr 29 '11 at 21:37
@stk, you can mark this question answered, if you post the above comment as answer and mark it as correct. – Mirzhan Irkegulov Oct 26 '11 at 7:47

You must log in to answer this question.

Browse other questions tagged .