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 have a keyboard with two "Win" keys but without "Menu" key. I'd like to bind my right Win as Menu. I tried do used xev in terminal and get keycode for .Xmodmap file but can't take code of right Win. Just always open system menu of ubuntu. How I can do it?

share|improve this question
add comment

3 Answers 3

This should be do-able using xmodmap.

First, find the keycode for your Win-key: Enter terminal using Ctrl+Alt+T, and type xev. Now press your Win-key and note down the keycode shown.

(If you have problems obtaining the keycode, you may first have to change the Win-key from being a one-key shortcut for Dash. How this can be done has been answered here.

Once you obtain the keycode, say xxx, execute in terminal

xmodmap -e "keycode xxx = Menu"

This should map you Win-key to Menu. You can test it using e.g. xev again: a little after the keycode, it should now write something like (keysym 0xff67, Menu).

To automate setting it on startup, see e.g. this.

share|improve this answer
add comment

The Win key in Ubuntu is a modifier. It treated just like the Alt and Ctrl keys and as such cannot be used as a standalone key.

share|improve this answer
2  
It is used as a "standalone" key in both 11.04 and 11.10. It does open the "main menu", which is dash in Unity, but it's also used in combination with other keys. Your answer is wrong. -1 –  Jo-Erlend Schinstad Sep 11 '11 at 13:40
add comment

If you haven't tried the keyboard preference mapping under Gnome, you should give it a look. This doesn't fit your description exactly, but it might work well enough.

From type, type keyboard to go to the keyboard preferences. Select the Layouts tab, then choose Win/Alt behavior.

keyboard preferences

share|improve this answer
    
I tried it before ask :) But nothing works. –  user24769 Sep 11 '11 at 6:38
add comment

Your Answer

 
discard

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.