Hi. Put the following commands somewhere where they'll be executed after X starts (a shell script in ~/.kde/Autostart for example):
xmodmap -e "keycode 115=Control_L"
xmodmap -e "keycode 117=Alt_R"
That should map key 115 (Windows key) to the left Control key, and 117 (Windows Right) to the right Alt key.
To be sure, fire up xev in a terminal while X is running. You'll get a window with a square in it. Any key you press will come up in the terminal like this:
KeyPress event, serial 25, synthetic NO, window 0x2a00001,
root 0x94, subw 0x0, time 97098412, (427,-177), root:(431,346),
state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes: ""
The keycode is the code of the key you pressed, and whatever shows where Control_L is is what X thinks the key means. Just hit the windows keys and replace what you get as the keycode in the commands above.
If you're not using X, then the following should do the trick
echo 'keycode ??? = Control' | loadkeys
Replace ??? with the keycode of the key you're remaping. I would check the man page for loadkeys for how to reset the keyboard before you start.
Last edited by ilikejam; 01-09-2004 at 05:57 PM.