1

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
ruffin
  • 111

2 Answers2

1
  • Install the gnome-tweaks package, if it's not already installed.
  • Open Tweaks -> Keyboard & Mouse -> Additional Layout Options -> Ctrl position
  • Uncheck the "Swap Ctrl and Caps Lock" option.
  • Check the "Caps Lock as Ctrl" option.
1

You can use the remapper deamon keyd for this purpose. See this answer for installation, usage and tips.

After installation, use the config below.

[ids]

[main]

capslock = layer(control)

Rasmus
  • 8,655