Remapping Caps Lock to Escape in Ubuntu 18.04 bionic

15,737

Solution 1

Found an option by installing Gnome Tweaks.

sudo apt install gnome-tweaks

Then open Tweaks, and click:

Keyboard & Mouse -> Additional Layout Options -> Caps Lock key behavior.

enter image description here

(On older versions of Ubuntu, you would need to install gnome-tweak-tool instead.)

Solution 2

In Ubuntu MATE 18.04, launch Keyboard and go to Layouts > Options > Caps Lock behaviour to customise Caps Lock (as an additional escape key, disable entirely, and other options).

Solution 3

setxkbmap -option ctrl:nocaps

disables the key reliably on the Xserver. This seems to be more reliable than the gnome tweak and I added it to my .bashrc to be sure.

I hope I never meet the guy (for his safety) who came up with this most annoying key ever...... So many hours of my live wasted to get rid on the 1000s of systems I setup since the 90s! Who is actually using it? Anybody?

And its on by default WHY? (this is a message to the distro guys to change it)

Share:
15,737
vrcmr
Author by

vrcmr

Updated on September 18, 2022

Comments

  • vrcmr
    vrcmr almost 2 years

    In Ubuntu 16.04, there was an option in the settings which allowed to switch between Esc and Caps Lock. Where is this option in Ubuntu 18.04?

  • Valentin V
    Valentin V almost 6 years
    If you're using VsCode, and it's not working, take a look at this solution:github.com/Microsoft/vscode/issues/23991#issuecomme‌​nt-292336504
  • Flimm
    Flimm about 5 years
    You can also use this tool to just disable caps lock altogether.
  • Michael Scheper
    Michael Scheper over 4 years
    To find the 'Gnome Tweaks' app for launching, look for 'Tweaks', not 'Gnome'.
  • U.V.
    U.V. over 3 years
    doesnt seem to work reliably on my ubuntu 20.04. option is disabled for ages.... and caps lock still on!
  • Jack
    Jack over 3 years
    This worked for me. Quick, easy, nothing installed. I agree that this key is useless. On the rare occasion I need to go all-caps, my pinky can man the Shift-key.