remap key with control modifier

Manfred Georg mgeorg at arl.wustl.edu
Wed Sep 6 20:59:27 PDT 2006


Hi,

The c and v key are inconveniently positioned in the dvorak layout
so that I can't hit control-c or control-v with my left hand while
moving the mouse.  Luckily I have an extra key (Super_L) which I
can play with.

Two solutions I was looking at.

I would like to remap the super key straight to
control-c and then have control-super be control-v and
be able to modify both of those with shift.
Unfortunately, this seems like a pipe dream since applications
require that a control key actually be held down for correct behavior.
xmodmap -e 'keycode 115 = 003'
doesn't work, let alone the other stuff I talked about.

Approach two.  Turn the super key into a control key that also changes the
keyboard layout (perhaps to qwerty).
I got close to this, except that again, I can't have the key
both change what a key produces (Mode_switch) and act as a control key.

Remap the extra key to Mode_switch
and then add the appropriate characters to nearby keys.

xmodmap -e "remove mod4 = Super_L"
xmodmap -e "keycode 115 = Mode_switch" # the super (windows) key
xmodmap -e "add mod5 = Mode_switch"
xmodmap -e "keycode 54 = j J c" # qwerty c key

now control-Mode_switch-j produces a control-c
However, I would like to remove the "control" from that sequence,
since I will never use Mode_switch without the control key also being
pressed.

Am I missing something, or are these things really not possible?

Manfred

##################################################################
"Must I do all the evil I can before I learn to shun it?  Is it
not enough to know the evil to shun it?  If not, we should be
sincere enough to admit that we love evil too well to give it up."
                                  - Mohandas K. Gandhi



More information about the xorg mailing list