Server Fault is a question and answer site for system and network administrators. 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

Is it a way in ubuntu linux to remap single key (for example, Alt_R) to keys combination (for example, Up)?

share|improve this question
up vote 2 down vote accepted

The command you want to examine is xmodmap. You can modify your keys as you wish; if you add the key settings to a file in your home directory (like .xmodmaprc) it will take effect on login as long as you run xmodmap with that file. You can also set the settings on the fly. Using the man (or xman) command will show you more information.

There are also graphical interfaces that do the same thing for both GNOME and KDE, though I don't know what they are.

share|improve this answer

Take a look at xmodmap then at the following guide on how to enable it on login

share|improve this answer

I've found that xev is a useful program to get key codes when making rules for xmodmap.

Also, note that Alt_R is a modifer key; you will have to use the "remove" command to make it a non-modifier key before you can use a "keycode" or "keysym" command on it.

share|improve this answer

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.