1

I want to remap Caps Lock to Esc on my Ubuntu 17.10 laptop.

I have tried this method: How to remap key in Ubuntu 17.10 Wayland? (Up key to Shift), this method: https://linuxcommando.blogspot.ca/2008/03/remap-caps-lock-key-for-virtual-console.html, and this method: https://wiki.archlinux.org/index.php/Xmodmap to no avail.

Neither work, Caps Lock is still Caps Lock.

How do I remap these keys system wide? It's dead simple in OSX, there is a setting in system preferences to make Caps Lock Esc and that's it, it works in every app. Is there anything similar in Ubuntu 17.10?

David Foerster
  • 36,264
  • 56
  • 94
  • 147

2 Answers2

5

You could try the Gnome-tweak-tool, assuming you're running on gnome, if you're on unity, there is a unity-tweak-tool. Both can be installed using apt:

sudo apt-get update

&&

sudo apt-get install gnome-tweak-tool

OR

sudo apt-get install unity-tweak-tool

in the gnome tweak tool under 'Keyboard & Mouse' there is an option called 'Additional Layout' options, in here you can change capslock key behavior, mapping it to esc, as well as just about anything you want.

Here is a picture as to what it might look like Gnome Tweak Tool

5

Same as tranfuria's answer but on command line:

gsettings set org.gnome.desktop.input-sources xkb-options "['caps:escape']"
Gunnar Hjalmarsson
  • 33,540
  • 3
  • 64
  • 94