How do I assign Control_R+Menu to the global kxkb switch action?

Posted on

Problem :

I want to use a combination that avoids alphabetic/punctuation characters because that way I have a consistent physical position on different layouts. Control_R+Menu fits that requirement and is also located at a very convenient position.

This combination used to work in KDE 3.5 for the global kxkb switch action, or any keyboard action for that matter. In KDE 4, trying to assign Menu by pressing the Menu key always activates the keyboard trap widget’s context menu, in this case giving me the What’s this? context help.

How do I work around that problem? Alternatively, do you have a snippet that I can paste into $HOME/.kde/share/config/kglobalshortcutsrc and which works?

Solution :

Remap the Menu Key (like this post) :

Put keycode 135 = F14 (or any other F-key or whatever) to ~/.xmodmap. This make the computer thinks that the Menu Key is the F14 key.

Then you put a script in the Autostart-folder (usually ~/.kde/Autostart) with the following content :

xbindkeys &

Make the script executable (chmod +x filename).

Either logout and in again, or just run the script.


Like this post, try running the following command (which has the same effect, but I don’t remember if this is permanent) :

xmodmap -e “keycode 135 = F14”

If 135 is not the right keycode, referring again the second link I provided :

Try running the command xev in a Konsole, and press the Menu key.
Look in the output of xev for keycode n, where n is the keycode of the Menu key.

Leave a Reply

Your email address will not be published. Required fields are marked *