3

I configured language switching by Alt + Shift combination by means of Ubuntu Tweeks. But after that other shortcuts that include Alt and Shift keys stopped working. For example, Ctrl + Alt + Shift + T in PyCharm IDE.

As work around I configured Left Alt + Left Shift for switching language. For it to work standard shortcut Win + space and all other language switching shortcuts must be disabled. After this I can use Right Alt and Right Shift in other shortcuts. So Ctrl + Right Alt + Right Shift + T is working

On Windows 7 there was no similar problem. Is this Ubuntu bug? This behavior is actual for Ubuntu 22.04 and 20.04.

Related question: Switching language by Alt + Shift after update from Ubuntu 22.04 beta to release is not working

1 Answers1

4

Recipe for Ubuntu 20.04:

Remove all shortcuts for language switching in Tweeks (Additional Layout Options -> Switching to another layout).

Just in case backup the parameters:

gsettings get org.gnome.desktop.wm.keybindings switch-input-source
# ['<Super>space', 'XF86Keyboard']
gsettings get org.gnome.desktop.wm.keybindings switch-input-source-backward
# ['<Shift><Super>space', '<Shift>XF86Keyboard']

Set the parameters:

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

Check Settings -> Keyboard Shortcuts, filter by source keyword.

Switching to next input source should become Alt+Shift L.

Switching to previous input source should become Alt+Shift L.

Like on the picture below: language switching config in settings

Switching language now should work by Alt + Left Shift. Holding Alt and pressing Left Shift should show standard language menu in the center of screen.

Ctrl + Alt + Shift + T shortcut should work by means of either left or right keys.

To be able to use, for example, Alt + Shift + C shortcut in IDE Shift should be pressed and hold first, then Alt + C. Otherwise Alt first + Shift will switch the language.