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)))

6
  • @N0rbert Hi) Thanks for the link, but I was able to switch the layout on 18.04.1, which is definitely newer than 17.10. And also I would not like to install additional software to solve standard issues. And I will use the option proposed by me on the link to SuperUser instead of installing additional software. I will edit the question for an unambiguous answer. Feb 18, 2019 at 18:44
  • 1
    @N0rbert You are right)) But my view of the world is that such simple tasks should be solved by the same simple methods. Setting up a program with a graphical interface through the console or installing an additional program is both bad. But I would prefer the option to configure via the console (if this is easy to do) than installing even the smallest additional program. After all, Linux distributions are full of useful programs included in the standard distribution, but as I understand it, switching the language via Alt + Shift is not included in this package (( Feb 18, 2019 at 19:05
  • 1
    @N0rbert Thank you for taking the time to do so, I will continue to investigate my question at leisure, install 04.1 and try to hide it understand how I switched the input in the previous time. And now, as I understand it, the answer to the question "switching by standard graphical interfaces" - Impossible. Feb 18, 2019 at 19:05
  • 1
    See my answer below. I tried to shed light on all aspects.
    – N0rbert
    Feb 18, 2019 at 19:07
  • Umm... installing an additional application is not necessary
    – pomsky
    Feb 19, 2019 at 5:48

1 Answer 1

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.

5
  • Imagine that I'm surprised the method with /etc/default/keyboard does not work. I tried to edit the file myself, and use dpkg-reconfigure. It did not work in both cases, either before reboot or after. My 04.2 does not switch over Alt + Shift, although the /etc/default/keyboard file has changed. Feb 18, 2019 at 19:20
  • Do not forget to run sudo update-initramfs -u -k all and then reboot. I have edited the whole answer to indicate that /etc/default/keyboard is universal method.
    – N0rbert
    Feb 18, 2019 at 19:24
  • Yes, I tried sudo dpkg-reconfigure keyboard-configuration, and sudo dpkg-reconfigure keyboard-configuration + sudo update-initramfs -u -k all. I tried to restart and turn off / on))) but none of the options affect the behavior of the switch Feb 18, 2019 at 19:39
  • Tricky way!!!!!!! Feb 18, 2019 at 19:41
  • dconf load work Feb 18, 2019 at 19:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.