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.

Any thoughts?

  • 1
    The bug does not seem to affect non-modifier keys. Can you choose a non-modifier key, and would that be an acceptable workaround for you? For example Menu. – Guildenstern Nov 7 '17 at 13:28
  • 2
    Thanks for your help. I didn't try, since one can simply avoid the menu 'focus' by simply using shift-alt instead of alt-shift (i.e. pressing shift first, then alt). – thomas Nov 10 '17 at 14:22
  • Similar issue is here: askubuntu.com/questions/908144/… – user502144 Nov 20 '17 at 19:54

Use shift+alt (i.e. shift before alt) in Firefox.

  • 2
    Thanks pomsky - it worked! .. Such a simple solution. Now all I have to do it to reprogram my hand not to use alt-shift :) PS - I tried to vote 'up' as the solution is good, but I can't, probably because I dont have enough 'reputation'. – thomas Nov 10 '17 at 14:20

I have the same issue with slack, after some digging found out that there is another way to change the keyboard layout w/o using gnome-tweak-tool which wont cause this side effect of losing the focus.

The solution is to use gsettings as explained here

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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