2

I tried to change the keyboard switch to Alt+Shift, but the graphic menu does not respond to pressing Alt+Shift.

I have two Ubuntu installed in parallel:

  1. Ubuntu 18.04.1, which at the first launch was switched to Alt+Shift. It was updated until 18.04.2, and now everything is in order with it.
  2. Ubuntu 18.04.2, which I installed today and she does not want to switch to Alt+Shift.

From what I remember - in 18.04.1 the interface for switching the layout was different (not the same as now in 18.04.2). And there I switched the layout keys without any problems. And now, on the new system, the new menu asks for "Enter a new combination" but does not respond to pressing Alt+Shift (or Shift+Alt). enter image description here

From the question-answer on SuperUser, I learned that you can edit the keyboard configuration file. I'll do it. I just have a file with working Alt+Shift from the first system (18.04.1-up-18.04.2).

But I also noticed that in both cases the graphical menu shows that input switching takes place via Shift+Super+Space (and Super+Space) and in both cases it works. But Alt+Shift also works on the system 18.04.1-up-18.04.2, but the graphic menu does not inform the user about this (as it was in the “previous-old-18.04.1” graphic menu).

18.04.1-up-18.04.2: 18.04.1-up-18.04.2

18.04.2: 18.04.2 Is it possible now to set the switching of the input language to Alt + Shift using the graphical menu in the clean system 18.04.2 and without installing additional software?

In both systems, all packages are updated in apt upgrade. And both systems are installed in VirtualBox on Windows10-Host. And I used RU locale)))

1 Answers1

3

Universal way

For entire system with text terminals use sudo dpkg-reconfigure keyboard-configuration and this command will produce the following /etc/default/keyboard file:

# KEYBOARD CONFIGURATION FILE

# Consult the keyboard(5) manual page.

XKBMODEL="pc105"
XKBLAYOUT="us,ru"
XKBVARIANT=","
XKBOPTIONS="grp:alt_shift_toggle,grp_led:scroll"

BACKSPACE="guess"

and it will update initrds automatically. The settings will be applied after reboot.
Please note: if you edit the /etc/default/keyboard file manually - then you should run

sudo update-initramfs -u -k all

manually and then reboot.

GNOME will inherit this settings on next login.

Tricky way

Simple method without additional software. All you need is dconf which is preinstalled.
You need to copy and paste the following big command into terminal:

dconf load / << EOF
[org/gnome/desktop/input-sources]
sources=[('xkb', 'us'), ('xkb', 'ru')]
mru-sources=[('xkb', 'us'), ('xkb', 'ru')]
xkb-options=['grp:alt_shift_toggle','grp_led:scroll']
EOF

GUI way

If you want GUI way - use GNOME Tweaks (gnome-tweaks package) as described in duplicate answer.

N0rbert
  • 103,263