208

When I try to set the default combo for switching to different language layouts in my keyboard from Shift+Super+Space to Alt+Shift I can't.

I used to have this combo since Ubuntu 14 and even before that when I used to have Windows. Now for some stupid reason it does not allow (actually nothing happens its not like I get an error or the combo is used elsewhere). How could I bypass this bug?

pomsky
  • 70,557
papajo
  • 3,087

5 Answers5

310

You may use (GNOME) Tweaks to achieve your goal. First install it by running

sudo apt install gnome-tweaks

(on Ubuntu 18.04 and later) or

sudo apt install gnome-tweak-tool

Launch Tweaks and go to Keyboard & Mouse section. Click on the "Additional Layout Options".

enter image description here

A new window should pop up. Look for "Switching to another layout" and expand it. Then check the "Alt+Shift" option.

enter image description here

pomsky
  • 70,557
166

You can achieve this using gsettings (command-line configuration tool).

  1. Set forward switch to Shift+Alt(left)

    gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Shift>Alt_L']"
    
  2. Set backward switch to Alt+Shift(left)

    gsettings set org.gnome.desktop.wm.keybindings switch-input-source-backward "['<Alt>Shift_L']"
    

To see the current setting value use get command:

gsettings get org.gnome.desktop.wm.keybindings switch-input-source
gsettings get org.gnome.desktop.wm.keybindings switch-input-source-backward

Examples of other key bindings:

<Primary>space, Alt_R, <Shift>Control_R, <Shift><Super>space

Changes will take effect immediately.

pomsky
  • 70,557
12

Ubuntu 20.04, gnome flashback, the gsettings option didn't work for me. This fixed the problem (copied from my other machine):

gsettings set org.gnome.desktop.input-sources xkb-options "['grp:alt_shift_toggle', 'grp_led:scroll', 'lv3:switch']"

Keyboard shortcuts still show Super+Space combination, and it still works, but Alt+Shift works as well.

wjandrea
  • 14,504
Marat
  • 253
  • 4
  • 7
9

I am running Ubuntu 22.04; the problem exists here as well; all answers and suggestions fail here except @rubmz's comment above:

gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Alt>Shift_L', '<Alt>Shift_R', '<Shift>Alt_L', '<Shift>Alt_R']"

wjandrea
  • 14,504
0

Just switch back to XORG (x11) and all your problems are gone. Have the same problem with Ubuntu 24.04, do a lot of things from the internet but nothing works. You can choose between Wayland or XORG when you login by clicking on the settings icon at the bottom right and selecting "Ubuntu XORG".