What's the opposite of setxkbmap -option ctrl:nocaps?
When you have already set something, you might need to clear before setting something new.
To unset:
To put it back to how it normally is, just
setxkbmap -option
works for me. – Emanuele Natale Sep 8 '14 at 19:29
Example: I was using setxkbmap -option ctrl:swapcaps
so that I could deal with (i.e. unset) caps lock after it got set by random quirks. Today I wanted nocaps, but could not set it because the other setting was still active. I used the command above and then I was able to use setxkbmap -option ctrl:nocaps
Would be really nice to find a complete, readable documentation where is explained how the keyboard mechanism works in Ubuntu and how to locally override it (and how it interacts with layout switching).
I am under the suspicion that there is really few people really understanding it (I remember a famous quote of Stephen Hawkings, methinks, about time); I have collected a bit of links in another answer but still, no general how-to.
Basically you should chase all the definitions for your keyboard starting from /usr/share/X11/xkb/symbols/us
--- if your keyboard is us
, substitute as needed; there are a lot of options and includes in it, it seems that most of the modifiers keys are in /usr/share/X11/xkb/rules/base
, where you can find:
caps:none = +capslock(none)
caps:ctrl_modifier = +capslock(ctrl_modifier)
ctrl:nocaps = +ctrl(nocaps)
ctrl:lctrl_meta = +ctrl(lctrl_meta)
ctrl:swapcaps = +ctrl(swapcaps)
and in xorg.lst
:
ctrl:nocaps Caps Lock as Ctrl
...
caps:capslock Caps Lock toggles normal capitalization of alphabetic characters
among gazillion other things. So what that mean, and what other options you have, are probably dependent on your layout, but you can try to guess something looking there. For example I would try
setxkbmap -option caps:capslock
to revert it.
Now, what they exactly mean, how do you enable it (via control center
-> keyboard
or language
, via gnome-tweak-tool
, command line, init scripts), how to make them impervious to a layout switch, if they work or not (I am unable to disable caps-lock and make it so across layout switches), is another matter.
If anyone can fill in the answer, please do that. I was used to tweak my keyboard with xmodmap
, I understand this is superceded, but would it be really nice to have an howto to how to tweak your keyboard...