0

I am on 22.04 and seen in gnome-tweeks that there is an option to use the Caps Lock as Esc but Shift Caps Lock as normal Caps Lock.

How could I achieve the same but instead of Esc I want to have Ctrl per default.

enter image description here

lnksz
  • 101

1 Answers1

0

A workaround that I found is modifying the /usr/share/X11/xkb/symbols/us file directly for my used layout (variant "altgr-intl" in my case).

Then I can remap the four levels of Caps Lock as

  • Left Control
  • Escape
  • Traditional Caps Lock
  • Backspace
   key <CAPS> { [Control_L, Escape,      Caps_Lock,       BackSpace ] };
   modifier_map Control { <CAPS> };

It can be (re-)loaded with setxkbmap -layout us -variant 'altgr-intl'. I didn't have any precompiled symbols files.

Still, a rule like escape_shifted_capslock just control_shifted_capsloc would be the real solution which isn't bound to a single layout.

lnksz
  • 101