I am using a freshly installed Ubuntu-Gnome 16.04, and I want to set caps-lock to change keyboard layout (single key, not key combination). I used to have this Linux-mint, and I grew used to it. I looked into the setting manager, but there is doesn't accept caps-lock as a valid input. I also looked int gnome-tweak-tools but there I can't find the keyboard layout switching at all. Is this possible? how?

  • Thank you. Please post this as answer for future reference
    – Yotam
    Apr 27, 2016 at 18:38

3 Answers 3


You could set the corresponding xkb option via dconf-editor.
Navigate to org > gnome > desktop > input-sources and add grp:caps_toggle to your xkb-options:

enter image description here

Note each option is enclosed in single quotes, options are separated by comma+space.

On older gnome3 releases you could do that also via System Settings > Keyboard (or gnome-control-center keyboard in terminal) > Typing > Modifiers-only switch to next source to Caps Lock

enter image description here

This was removed from recent releases (see sanmai's answer for alternatives to dconf-editor).


If you're looking for a way to visually edit configuration as in other answer, there's dconf-editor supplied with dconf-tools:

sudo aptitude install dconf-tools

If you fancy batch editing needed value, here's how you can read it:

dconf read /org/gnome/desktop/input-sources/xkb-options

And here's how to update it:

dconf write /org/gnome/desktop/input-sources/xkb-options "['grp:caps_toggle']"

You may need to logout and log back in for changes to take effect, but in my case changes came into effect immediately.

Other option is to use gnome-tweaks.

Location of the "Additional Layout Options" button in the interface of Gnome Tweaks.

Menu showing an option to use CAPS LOCK as a keyboard switch.

  • 1
    It looks like gnome-tweak-tool now lacks menu Swithing to another layout. Your first approach works
    – IC_
    Oct 8, 2018 at 23:38
  • @Herrgott, On my machine, running gnome-tweaks 3.30.2, Under the top level menu Keyboard & Mouse there is a button Additional Layout Options which opens a modal dialog box with the options shown here for Typing. @sanmai, it would be helpful if you could update your answer.
    – LeoRochael
    Apr 29, 2019 at 14:13
  • @LeoRochael I guess you made a mistake with mention. I haven't posted an answer. I'm not using gnome and this is one of the reasons
    – IC_
    Apr 29, 2019 at 23:51
  • @LeoRochael Done, thanks for the tip!
    – sanmai
    Apr 30, 2019 at 0:28

In Cinnamon on Linux Mint (or other Gnome like):

                         |->Switching to another layout->Caps Lock
                         |->Use keyboard alternative ... LED->Caps Lock

enter image description here enter image description here enter image description here

  • 1
    Is this just a text-based description of sanmai's answer?
    – Jeff Schaller
    Jun 16, 2020 at 18:15
  • 1
    Nope. He's using gnome-tweaks but all rly simpler.
    – beguy
    Jun 18, 2020 at 8:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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