5

I use gnome-tweaks to turn my Caps Lock into a Control Key. This works normally, but not when I plug in a new external keyboard. I can make it work by:

  1. Opening gnome-tweaks
  2. Getting to the right place on the GUI: Keyboard & Mouse -> Additional Layout Options -> Caps Lock behaviour
  3. Flipping between any other option and "Caps Lock is also a Ctrl"

Is there some terminal command I can run that will refresh gnome-tweaks for my currently plugged in devices? Failing that, is there a command I can run that will do this switch I'm currently doing manually?

This is a bug, but it's affecting my current version and the above would serve as a workaround.

Chris Midgley
  • 335
  • 5
  • 12

1 Answers1

5

This is untested, but you may want to try:

gsettings reset org.gnome.desktop.input-sources xkb-options
gsettings set org.gnome.desktop.input-sources xkb-options "['caps:ctrl_modifier']"
Gunnar Hjalmarsson
  • 32,938
  • 3
  • 63
  • 94
  • 1
    For those who map Caps Lock to Escape, change `'caps:ctrl_modifier'` to `'caps:escape'`. See this [answer](https://superuser.com/questions/566871/how-to-map-the-caps-lock-key-to-escape-key-in-arch-linux) for more information. – marnix Jan 08 '21 at 15:04