5

First of all for some reason I have two different "switch keyboard layout" hotkeys: one which I set in Settings->Devices->Keyboard and the second one(Left ctrl + Left shift) is produced by keyboard-configuration package.

Calling sudo dpkg-reconfigure keyboard-configuration and removing hotkey binding solves the issue just until the reboot/sleep mode.

Having tried to remove keyboard-configuration I got the following output:

The following packages will be REMOVED:
console-setup console-setup-linux kbd keyboard-configuration nvidia-384 nvidia-driver-390 ubuntu-desktop ubuntu-minimal xorg xserver-xorg xserver-xorg-core
xserver-xorg-input-all xserver-xorg-input-libinput xserver-xorg-input-wacom xserver-xorg-video-all xserver-xorg-video-amdgpu xserver-xorg-video-ati
xserver-xorg-video-fbdev xserver-xorg-video-intel xserver-xorg-video-nouveau xserver-xorg-video-nvidia-390 xserver-xorg-video-qxl xserver-xorg-video-radeon
xserver-xorg-video-vesa xserver-xorg-video-vmware

It does not look like this package should be removed. So why there are two different sources of layout switch bindings and how can I remove one?

Thanks!

2 Answers2

7

Besides running sudo dpkg-reconfigure keyboard-configuration you probably need to remove it from the desktop settings too. Try this command:

gsettings reset org.gnome.desktop.input-sources xkb-options

After that the removal of the extra shortcut should survive a reboot.

Gunnar Hjalmarsson
  • 33,540
  • 3
  • 64
  • 94
1

Two moments here:

  1. You should not remove keyboard-configuration package. It is used for console (dumb terminal) sessions.
  2. To save configuration produced by sudo dpkg-reconfigure keyboard-configuration you need to update initial RAM-drive for kernels with

    sudo update-initramfs -u -k all
    

    and then reboot.

N0rbert
  • 99,918
  • Thanks for the answer however it does not help with preserving the changes. – Long Smith Sep 09 '18 at 17:35
  • It is strange. Then please add output of cat /etc/default/keyboard and ls -al /etc/default/keyboard to your question. – N0rbert Sep 09 '18 at 17:48
  • Thanks for the help again! The problem is solved with another answer. – Long Smith Sep 09 '18 at 20:26
  • @N0rbert: No, it's not strange. Running the command you suggested is equivalent with rebooting in this respect. The thing is that dconf imports XKB options set system wide, and deleting such options system wide does not 'unimport' them. You need to do that manually. – Gunnar Hjalmarsson Sep 09 '18 at 23:57