I recently installed Ubuntu 17.10, and when I tried to set my keyboard layout to change with alt+shift, I hit a well known bug. There is a workaround, using
gnome-tweaks-tool which works, but then it creates an unwanted behaviour on Firefox (perhaps other programs as well).
After setting alt+shift through
gnome-tweak-tool as the combination to change language, whenever this combination is pressed within Firefox, it triggers a toggle that Firefox uses to show/hide the Menu Bar (with File/Edit/View etc.), and 'focus' is taken away from wherever the cursor was.
It's very frustrating, because one has to go and click again at the cursor. The only solution I found was to permanently enable Menu Bar in Firefox because then alt doesn't do anything and I can use it to change languages. But I don't want to have Menu Bar on top always.
I hope you can understand what I'm trying to explain.