Changing Keyboard Shortcut in Ubuntu 20.04 [duplicate]
Solution 1:
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".
A new window should pop up. Look for "Switching to another layout" and expand it. Then check the "Alt+Shift" option.
Solution 2:
You can achieve this using gsettings
(command-line configuration tool).
-
Set forward switch to Shift+Alt(left)
gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Shift>Alt_L']"
-
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.
Solution 3:
Ubuntu 20.20, 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.