Sunday, May 5, 2024
158
rated 0 times [  158] [ 0]  / answers: 1 / hits: 205906  / 3 Years ago, tue, september 28, 2021, 6:02:39

How can I permanently switch the Caps Lock and Esc key functions in Saucy? I can use this command to do it temporarily (until reboot):



/usr/bin/setxkbmap -option "caps:swapescape"


I tried adding that command as a Startup Application, but it doesn't seem to do anything.


More From » keyboard-layout

 Answers
6

Another way to do this is through the dconf-editor. This method has a few extra steps from gnome-tweak-tool, but is useful if you don't want to pull in the dependencies from the tweak tool.


This will allow you to use the caps:swapescape syntax and automatically make the change permanent.


sudo apt-get install dconf-tools

On Ubuntu >20.04, you'll need to run the following - see this post:


sudo apt install dconf-cli dconf-editor

After starting the dconf-editor, navigate to org >> gnome >> desktop >> input-sources


Add the options that you need in xkb-options. The option strings are surrounded by single quotes and separated by commas. Be careful not to delete the brackets on the ends.


xkb-options in dconf-editor


You can use this method to enter most of the traditional xkb options that are no longer available in System Settings >> Text Entry. The exception are the settings for switching the keyboard layouts, which currently do not work because of a bug.


For a list of the options and the syntax, use man 7 xkeyboard-config in a terminal.


Another common option that could be used is terminate:ctrl_alt_bksp to allow ctrl+alt+backspace to end the X-session.


[#28835] Thursday, September 30, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
landarre

Total Points: 254
Total Questions: 96
Total Answers: 109

Location: Burundi
Member since Sun, Apr 16, 2023
1 Year ago
;