I tried the solution here to remap Caps Lock to Control.
Open the following for editing:
sudo vi /etc/default/keyboard
And edit
XKBOPTIONS="ctrl:swapcaps"
Then, reconfigure:
sudo dpkg-reconfigure keyboard-configuration
I started with exactly that not to get too crazy. It worked. But now I can't get it to go back.
I edited the keyboard file back to its original contents...
# KEYBOARD CONFIGURATION FILE
Consult the keyboard(5) manual page.
XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT=""
XKBOPTIONS=""
BACKSPACE="guess"
... but even after rebooting, caps is still control and control is still caps.
Where should I look to set things back?
What should I do to get both Control and Caps to invoke Control?
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy
sudo dpkg-reconfigure keyboard-configuration
and then rebooted. In the reconfigure flow, I just accepted every default -- not sure if there was something else I needed to do, but I think that was right. – ruffin Feb 21 '23 at 02:17keyboard
file still has the contents I pasted, above. – ruffin Feb 21 '23 at 02:57gsettings get org.gnome.desktop.input-sources xkb-options
– Gunnar Hjalmarsson Feb 21 '23 at 12:19['caps:ctrl_modifier']
, fwiw, which is what we'd expect, I believe. – ruffin Feb 25 '23 at 16:29gsettings reset org.gnome.desktop.input-sources xkb-options
– Gunnar Hjalmarsson Feb 25 '23 at 16:49sudo dpkg-reconfigure keyboard-configuration
specifically. Is that required or a red herring? etc My assumption is that the steps above didn't work (b/c they didn't for me -- could be PIBKAC, could be instructions; trying to find out which). What are the right ones? etc etc Thanks again. – ruffin Feb 25 '23 at 17:04XKBOPTIONS
in/etc/default/keyboard
, that value automatically was added to your user settings at next login. When you changed/etc/default/keyboard
back to its original content, the value was still kept in your user settings. You you should have run the reset command too, as I mentioned above, to also drop the value from your user settings. Alternatively you could have dropped it using Tweaks. – Gunnar Hjalmarsson Feb 25 '23 at 17:50