Ubuntu – Swap capslock and control in virtual consoles

10.04capslockkeyboardvirtual-console

I'm using System > Preferences > Keyboard > Layout > Options > Ctrl key position > Swap Ctrl and CapsLock, which works great for X.

How can I get the same for virtual consoles (Ctrl+Alt+F1, etc.)?

Best Answer

  1. Set your preferred keyboard options: System > Preferences > Keyboard > Layouts > Options
  2. Apply the layout and options system-wide: System > Preferences > Keyboard > Layouts > Apply System-Wide
  3. Reboot for the changes to take effect in the virtual consoles.

To double-check that the settings have been applied, look for XKBOPTIONS="ctrl:swapcaps" in /etc/default/console-setup. (Alternatively, if you know what you're doing you can go ahead and just edit this file directly.)

Related Question