Do not use gnome's keyboard control (Ubuntu System > Preferences > Keyboard > Layout Options).
Instead follow the example in man xmodmap as explained below.
NOTE: before doing this, undo any changes in Keyboard layout options. Put the options back to defaults in gnome's keyboard control.
And, if you have done anything advanced to try to work around this issue, remove those modifications too. For example, the following is NOT needed so if you are using it, remove it (may require a restart):
xmodmap -e "clear lock" -e "add lock = Caps_Lock"
then, from a terminal, run:
xmodmap /etc/SwapCapsCtrl.kmap
To make the change permanent, do this:
edit /etc/rc.local
add the following before the last line that says 'exit 0'
sudo loadkeys /etc/SwapCapsCtrl.kmap
In addition, this solves my problems with tsclient.
I found a workaround. I'm using Hardy beta.
Do not use gnome's keyboard control (Ubuntu System > Preferences > Keyboard > Layout Options).
Instead follow the example in man xmodmap as explained below.
NOTE: before doing this, undo any changes in Keyboard layout options. Put the options back to defaults in gnome's keyboard control.
And, if you have done anything advanced to try to work around this issue, remove those modifications too. For example, the following is NOT needed so if you are using it, remove it (may require a restart):
xmodmap -e "clear lock" -e "add lock = Caps_Lock"
Put the following in a text file.
!
! Swap Caps_Lock and Control_L
!
remove Lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L
save the above as /etc/SwapCapsCt rl.kmap
then, from a terminal, run: rl.kmap
xmodmap /etc/SwapCapsCt
To make the change permanent, do this: rl.kmap
edit /etc/rc.local
add the following before the last line that says 'exit 0'
sudo loadkeys /etc/SwapCapsCt
In addition, this solves my problems with tsclient.