Awesome! Thanks for the tips! Here is how to map the windows key to
control.
Use xev to find the keycode for the key you want to remap.
115 is the windows button and 117 is the menu button. (on my laptop
anyway) You can then use "xmodmap -pk" to see what is already mapped to
115. Probably nothing. The problem I had for a while was just using the
keycode command but not using the add command. The mapping would show up
in "xmodmap -pk" but no apps would realize it. The "add control..." line
was the key.
Make a file and call it something like .xmodmap. Put this in it.
! windows key
keycode 115 = Control_L
! menu key
keycode 117 = Control_R
add Control = Control_L Control_R
Then run "xmodmap .xmodmap". You can put this in your .xinitrc to make it
permanent.
If you want to swap your control and caps lock and still map the windows
button to control put this in your .xmodmap. Note the position of the add
Control line.
! swap caps and control
remove Lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
!
! make left windows key = left control
keycode 115 = Control_L
! make right menu key = right control
keycode 117 = Control_R
add Control = Control_L Control_R
On Sun, 22 Apr 2001, Peter Jay Salzman wrote:
> you can do this by finding the keycode of the "windows key" using xev and
> then mapping the keycode using xmodmap.
>
> you can then put the xmodmap in one of your startup files (make sure it
> doesn't run in console; it'll generate an error).
>
> man xmodmap should give pretty explicit instructions on how to map a
> particular keycode to the control key.
--
Dale Bewley - Bewley Internet Solutions Inc. http://bewley.net/