swapping capslock and ctrl doesn't work well in opensuse 12.2

Hi,
I selected “configure desktop” > “Hardware” > “Input Devices” > “Keyboard” > “Advanced” > “Ctrl key position” > “Swap Ctrl and Caps Lock”.
In most cases it works. However, shift + capslock is recognized as shift + capslock.
I want shift + capslock work as shift + ctrl.
How do I configure swapping ?

Is that KDE, Gnome or other?

i use kde. i forgot to say.

Normally you would use -option ctrl:nocaps of setxkbmap to have capslock behave like ctrl. I believe that in this case, shift + capslock will also do the same as as shift + ctrl.

This is what I use system wide (in /etc/X11/xinit/xinitrc, /etc/X11/xdm/Xsession and other Xsession scripts*), since capslock is an annoyance for everyone, no matter in which DE:


# enable  CTRL-ALT-BKSP, disable CAPSLOCK, use Right-Ctrl as compose key
setxkbmap -keycodes "evdev+aliases(qwerty)" -rules evdev -option terminate:ctrl_alt_bksp **-option ctrl:nocaps** -option compose:rctrl
  • Find out which one your kdm uses.

Henk, I didn’t mean to quote you. Neither did I mean to quote myself. It seems that the forum does automatically ‘reply with quote’ now. (?)

Thank you.

I unchecked all keyboard options and ran the command “setxkbmap -option ctrl:nocaps”.
Then Successfully Shift + CapsLock was recognized as Shift + Ctrl.

By the way, there is also “Caps Lock as Ctrl” option in “configure desktop” > “Hardware” > “Input Devices” > “Keyboard” > “Advanced” > “Ctrl key position” settings.
After ran setxkbmap command, “Caps Lock as Ctrl” option was checked automatically.So it seems that the keyboard settings and setxkbmap command are connected and working together.
I also tried ctrl:swapcaps then “Swap Ctrl and Caps Lock” was checked automatically.

I’m happy with ctrl:nocaps but it is better to make ctrl work as capslock.