Setxkbmap installation is lost when I switch keyboard layout in Ubuntu 16.04

I set my Caps Lock as Ctrl in Ubuntu 16.04 using: setxkbmap -option 'caps:ctrl_modifier' But when I change the keyboard from En to Cs, Caps Lock becomes Caps Lock again, not Ctrl.

To fix this, I have to execute the above command setxkbmapagain from the terminal.

How can I make the setting permanent even if I switch keyboard layouts?

+4
source share
3 answers

To make the parameters setxkbmap set permanent, add them /etc/default/keyboardas follows:

--- a/etc/default/keyboard
+++ b/etc/default/keyboard
@@ -5,6 +5,6 @@
 XKBMODEL="pc105"
 XKBLAYOUT="us"
 XKBVARIANT=""
-XKBOPTIONS=""
+XKBOPTIONS="caps:ctrl_modifier"

 BACKSPACE="guess"

caps:ctrl_modifier , En .

+4

. , Ubuntu 16.04: - /.bashrc( vim.bashrc( ). - ! : setxkbmap -option ctrl: swapcaps

-1

Source: https://habr.com/ru/post/1656831/


All Articles