I would like to swap the behavior of the two keys Shift and Caps Lock on my keyboard.

I have read the options in /usr/share/X11/xkb/rules/base.lst, played around with'em, but none of them seems to be the exact one I need.

Is this possible? If yes, how should I do?

  • 1
    It is possible if you define a custom option, like here. It's pretty much the same procedure only the first step (the symbols file) is different (you'll have to use replace key). You think you can handle that or do you want me to rewrite it here, tailored to your needs ? – don_crissti Aug 11 '15 at 20:02
  • @don_crissti This looks promising! I'll have a try. – iago-lito Aug 12 '15 at 7:22

The tools to manipulate the keyboard layout on the virtual consoles are loadkeys, dumpkeys and showkeys. Read their manpages and inform yourself about their intricacies.

Note that these tools only work in a virtual console, not in a terminal emulator in a graphical environment like gnome. The learn about the difference read this question and answers: https://askubuntu.com/questions/14284/why-is-a-virtual-terminal-virtual-and-what-why-where-is-the-real-terminal.

Look at this example:

http://tldp.org/HOWTO/Keyboard-and-Console-HOWTO-15.html

  • Why not. I'll have a try if creating a new option as suggested by don_crissti doesn't work. Unfortunately, I would like it to work in the graphical environment as well. – iago-lito Aug 12 '15 at 7:24

On Debian with Gnome you can install gnome-tweak-tool. In the secton "Typing" there are loads of available behaviors for Caps Lock

  • 1
    I guess there are pretty much the same as the ones in base.lst, and unfortunately none of them is the one I need :\ – iago-lito Aug 12 '15 at 7:23

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.