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

1

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?

daxim

Posted 2010-02-01T16:34:47.033

Reputation: 1 072

Answers

0

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 :

#!/bin/sh
xbindkeys &

Make the script executable (chmod +x filename).

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

OR

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.

Studer

Posted 2010-02-01T16:34:47.033

Reputation: 3 448

Accepting you pro forma because it's close enough and the bounty expires tomorrow. Of course I use a modern key mapper instead of xmodmap. The future shall reveal whether I really can dispense with a logical Menu key or whether this will turn out to be a mistake. – daxim – 2010-02-15T01:37:13.880