How to swap caps and control keys
Tofloor
poster avatar
milindkamble
deepin
2016-05-25 12:49
Author
Hi. I would like to know how to swap capslock and control keys. Searchinng the web for Debian-based systems indicated that "setxkbmap -option 'ctrl:nocaps' " would the way to do it.
But it does not work. In deepin-terminal, when I press down the capslock key, the window looses focus, hence i can't type anything. when I release the capslock, the focus returns.
setxkbmap -print shows the following output

sh> setxkbmap -print
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)"        };
        xkb_types     { include "complete"        };
        xkb_compat    { include "complete"        };
        xkb_symbols   { include "pc+us(dvorak)+inet(evdev)+ctrl(nocaps)"};
        xkb_geometry  { include "pc(pc105)"        };
}


Thanks in advance.

Milind
Reply Favorite View the author
All Replies
dance707
deepin
2016-05-25 14:10
#1
Hi, Welcome to the Deepin Forum. It has something to do with caps lock being a dde-session daemon grab
What I posted here did not fully work but might point you in the right direction
https://bbs.deepin.org/post/31020
Reply View the author
milindkamble
deepin
2016-05-27 15:31
#2
Thank you for the pointer dance707.

This is what worked for me:
gsettings set com.deepin.dde.mediakey capslock "['ctrl:nocaps']"
gsettings set com.deepin.dde.keyboard layout-options "['ctrl:nocaps']"

I prefer to map caplock to ctrl and leave the original ctrl unchanged. Hence I used "nocaps" instead of "swapcaps"

The suggested command in your pointer : gsettings set com.deepin.dde.keybinding.mediakey capslock "" throws an error.
Reply View the author
dance707
deepin
2016-05-27 15:57
#3
https://bbs.deepin.org/post/31053
Thank you for the pointer dance707.

This is what worked for me:

Thank your for your information.
Reply View the author
New Thread

Popular Events

More
国际排名
WHLUG