My goal is to PERMANENTLY remap CAPSLOCK into ESC key under Ubuntu 22.04.3 with Wayland display server.
Second requirement is to do it without installing additional software.
I need it for VIM, to be fast and effective using text editor.
I've tried few ways to do it, but since I'm not experienced Linux user, I've failed.
First thing I've tried was in this article.
It's written there to execute the following command:
setxkbmap -option caps:escape
in order to remap CAPSLOCK into ESC and it even works temporarily.
I check the results here.
But as stated in the article, the mapping is only temporary.
Therefore I'm heading forward to make it PERMANENT, by editing the /etc/default/keyboard
file. Like so:
# KEYBOARD CONFIGURATION FILE
# Consult the keyboard(5) manual page.
XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT=""
XKBOPTIONS="caps:escape"
BACKSPACE="guess"
https://thesynack.com/posts/persistent-capslock-behavior/
https://askubuntu.com/questions/363346/how-to-permanently-switch-caps-lock-and-esc
But it still won't work after the Ubuntu restart and I don't understand why?
Is this article I'm using to remap CAPSLOCK into ESC X11 specific?
Because I'm using Wayland display server. It's default in my Ubuntu Ubuntu 22.04.3.
I've also read carefully this question over here and all the answers provided. Although there's a lot of knowledge and accepted answers, the whole thread is 10 years old - long before Wayland was the default display server in Ubuntu - therefore I've felt at liberty to ask this question again.
gsettings
based answers? They should work on GNOME on Wayland – muru Aug 06 '23 at 01:16