Swap/Remap Ctrl and Alt keys.......Finally

Young tuxman at knology.net
Sun Jun 8 23:10:02 UTC 2008


Thanks Mario for the info on xkeycaps.

I have it working the way I want it to now.

Both Alt keys and Ctrl keys are swapped, so I can use the keys next to 
the space bar, as if it were a Mac.

One thing that has changed is that you don't have to add it to a 
startup/login script. If you restart after saving the change in 
xkeycaps, when you log back in a window pops up asking what you want to 
do with the .xmodmap file you've created. Just select the file, not the 
backup, and from then on it runs at login. I'm left to wonder if it 
could catch any additional changes made later. Maybe I should test that.

I don't know if Ubuntu is watching your home folder for new files, or if 
something else triggered this. It seems to be usual in Ubuntu, for 
programs and utilities to not tell you their name, nor give you a way to 
find it.

Either way it was a big help to me since I've yet to learn how to create 
and run startup scripts, and the google search for help wasn't encouraging.

Regarding xkeycaps still. There were a couple of things that left me 
wondering.
It shows a message saying you need to add a line to a login script to 
contain:
xmodmap~/.xmodmap-`uname-n`
with a note that ` is a back quote.

First I don't know what ~ means, and there's no way I know of to google 
that. From the context, and knowing where it saved the change file I'm 
guessing that ~ means /home/username. Is that the case, and is it always so?

Second, what do the back quotes mean? Do they simply indicate that uname 
should be changed to the correct users name? Would they be required as 
part of the syntax? And why is there a -n inside the back quotes?

Third, figuring out which keyboard matches the one on your machine isn't 
straight forward. The names don't match what you find in other places on 
your system. The good thing is that the graphic display of the keyboard 
changes for each, so you get a lot of help that way.


This has been a very frustrating experience, and a real eye-opener. It 
took me 5 days to solve this. On WinXP it took me less than 20 minutes, 
from the time I thought of it, until it was accomplished. And that was 
finding a program to do it which I had never used before, (AutoHotKeys), 
downloading it, reading the documentation, writing the script, and 
setting it to run at startup. And I didn't need anyone's help.







More information about the ubuntu-users mailing list