28

After the latest upgrade on Debian stretch, hitting alt+shift on my keyboard make it change layout, which breaks all my alt+shift+<anything> xbindkeys shortcuts.

I have disabled all shortcuts in Settings -> Keyboard -> Input. Still the same.

In Settings -> Languages, it is said that this alt+shift behaviour can be tweaked in.. Settings -> Keyboard. But alt+shift seems to be set nowhere there. Is it hardcoded? Is there a way xbindkeys can work around this?

iago-lito
  • 2,751

3 Answers3

50

Okay, got it: this line in my /etc/default/keyboard

XKBOPTIONS="grp:alt_shift_toggle,grp_led:scroll"

.. should not contain grp:alt_shift_toggle, which is the relevant xkb option according to this post.

In addition, Gnome overrides xkb options according to this other post. As a consequence, this output:

$ dconf read /org/gnome/desktop/input-sources/xkb-options
['grp:alt_shift_toggle','grp_led:scroll']

.. should not read grp:alt_shift_toggle on my machine either. So after I ran:

dconf write /org/gnome/desktop/input-sources/xkb-options "['grp_led:scroll']"

I got my good'ol behaviour back ;)


I have filed this as a bug to Gnome.

iago-lito
  • 2,751
  • 1
    I was able to disable the Alt + Shift shortcut for changing keyboard layout by disabling the shortcut in Settings > Keyboard > Shortcuts > Typings > Modifiers-only switch to next source. Yes, the name is quite vague but you can see that it's mapped to Alt + Shift. – hb20007 Sep 08 '18 at 17:47
  • @hb20007 I think this is the naive first try that surprisingly didn't work in my case back then. However, the navigation was a little different from the one you are describing. Which version of gnome are you talking about? – iago-lito Sep 08 '18 at 17:53
  • gnome-shell --version gives 3.18.5 – hb20007 Sep 08 '18 at 18:46
  • 1
    @hb20007 Okay, I get it then. This post is about a problem occuring on 3.22, which is the reason why it works fine in your case :) – iago-lito Sep 08 '18 at 18:50
  • 1
    For anyone else wondering why this is not working for them - don't run it as root :) – php_nub_qq Dec 14 '21 at 14:25
3

In my case I'm using Ubuntu 18.04. I was able to solve this problem by re-configuring my keyboard setting:

$ sudo dpkg-reconfigure keyboard-configuration
Melchia
  • 131
  • Note: in Ubuntu 22.04 this configures the shortcut for when you are in TTY, but for the GUI environment you need to edit GNOME config via dconf or gnome-tweak-tool (at least that's how it is for me) – szx Sep 05 '23 at 15:12
1

Also this is another option in graphical mode (gnome 3.22):

  1. Open the gnome 'tweak tool' or type gnome-tweak-tool on a terminal
  2. Go to the 'Typing' tab
  3. Click on 'Switching to another layout'
  4. Choose your favorite shortcut avoiding Ctrl+Shift and Alt+Shift
slava
  • 173