Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

This keyboard has only one super key, so I want to remap the menu key to make up for that.

share|improve this question
up vote 13 down vote accepted

Use xev to find the keycode for the key you want to remap. For example if I press Menu key it tells me that that is keycode 135.

Next in my ~/.xmodmaprc file, I add a line like this:

keycode 135 = Super_R

... to make it the right hand windows key. Then all that remains is to activate the key remaps. This usually happens automatically on login to your x session, but if your Desktop Environment doesn't do that you can run it manually as xmodmap ~/.xmodmaprc from a command line or whatever script gets run when you login.

share|improve this answer
The only real problem with xmodmap is, when you switch layouts. You have to execute xmodmap again. – greenoldman May 19 '11 at 4:46
I just tried exactly this, and I do not get any event for the menu key. I use Xfce4 maybe that's the reason, but I can't map the menu key to anything useful. – Arne Jun 2 at 23:59
@arne no event shows in xev? Do all the other keys show events? – Caleb Jun 3 at 3:44
@Caleb yes all other keys show events. But for me it is solved now. I found out, that when I do xmodmap ~/.Xmodmap from .xinitrc, as it is described in arch wiki, it does work. Just the preview with xmodmap when I am already logged in doesn't work. – Arne Jun 6 at 18:53

I don't know what system you use, but if it is quite modern login as root, go to


Copy (make a backup) evdev file. Edit it. Find the line with Menu Key and change its alias to super key (left or right) e.g. change

alias <MENU> = <COMP>;


alias <MENU> = <SUPR>;

Logout, login (X11 has to be restarted), enjoy your new keyboard.

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.