default-settings icon indicating copy to clipboard operation
default-settings copied to clipboard

Keyboard → Switch Layout shortcut conflicts with Alt+Tab

Open cassidyjames opened this issue 7 years ago • 15 comments

Our default "Switch layout" shortcut for switching between keyboard layouts is Alt+Shift, but that conflicts with and breaks Shift+Alt+Tab to switch windows backwards. We should disable or change this shortcut since we keep getting bugs about Shift+Alt+Tab being "broken".

Moved from https://github.com/elementary/gala/issues/18

cassidyjames avatar Nov 02 '17 20:11 cassidyjames

I really recommend to change the shortcut as working in different languages gets much more convenient with a shortcut.

snowparrot avatar Dec 13 '17 08:12 snowparrot

This is a big problem indeed, but "change one of conflicting shortcuts" is not an option - it's just avoiding and postproning general problem. If change layout is bind to alt+shift, then it brokes every other shortcut wich starts with alt+shift, if you change it to something else, some other shortcuts will be broken. why windows, mac, gnome, kde etc can solve this problem and elementery can't?

Also on topic. alt+shift, alt+tab, alt+shift+tab is common across desktops and countries, why change defaults?

Most of all, why can't I map my own shortcut to switch layouts?

Philosoft avatar Feb 08 '18 06:02 Philosoft

I assume this a problem somewhere where the shortcuts are detected and passed off. Maybe we are detecting alt+shift on keydown instead of keyup?

lewisgoddard avatar Feb 08 '18 07:02 lewisgoddard

This is a very long standing issue in X itself, GNOME is almost certainly affected too.

https://bugs.freedesktop.org/show_bug.cgi?id=865

I think our only option really is to bind the language switching shortcut to something that doesn't conflict. Which is easier said than done, since you could move it to Ctrl+Shift, but then Ctrl+Shift+Tab would stop working for switching tabs in a web browser. But a slightly less common conflict than Alt+Shift+Tab I would guess

davidmhewitt avatar Feb 14 '18 00:02 davidmhewitt

Why not something that doesn't conflict at all, like Ctrl+Alt+L?

lewisgoddard avatar Feb 14 '18 01:02 lewisgoddard

@lewisgoddard i, myself, would prefer AltGr to do so, but there are not any suitable options (or as you propose custom ctrl+alt+L. screenshot:

screenshot from 2018-02-14 10 32 41

as I additionaly notice, you just cannot screenshot popup menu with PrtSc - it simply doesn't work.

Philosoft avatar Feb 14 '18 07:02 Philosoft

I'm going to bump this to beta2 since it doesn't imply any string or UI changes

danirabbit avatar Apr 26 '18 20:04 danirabbit

I'm going to drop this from beta2 since it seems discussion is still ongoing and an agreement hasn't yet been reached

danirabbit avatar Aug 08 '18 15:08 danirabbit

How did other Distro's fix this?

@danrabbit @cassidyjames Maybe one of you (being the most public) could do a poll on Twitter and/or Reddit?

peteruithoven avatar Oct 01 '18 12:10 peteruithoven

FYI: Gnome switches language input with Super+Space (and this cannot be changed btw). Alt+Shift is familiar to all my Windows colleagues.

And to @Philosoft - most desktops I used in recent years cannot take screenshots with open popup menus with simple PrtSc press - I always had to set a timer for such screenshots. What I'm saying is that this is by far not unique to elementary.

janxkoci avatar Dec 16 '18 19:12 janxkoci

Windows uses Alt+Shift, but as @davidmhewitt it seems problematic to bind it to only modifier keys that are used in other shortcuts out of the box. GNOME uses Super+Space which we use for Applications Menu. It looks like macOS uses Ctrl+Space/Alt+Ctrl+Space to cycle in different directions: https://support.apple.com/guide/mac-help/type-language-mac-input-sources-mchlp1406/mac

I'm going to propose we change the default key in elementary OS to not conflict with the Alt+Tab switcher. Any combination of only modifier keys (e.g. Alt, Ctrl, Shift, and Super) seems to be a bad idea as it will inevitably conflict with shortcuts in the system or in apps. Thus, Alt+Space seems like a sane option (which already exists in the options), or if possible, Ctrl+Space to at least match one other platform (macOS).

And remember, users can always change it to something that is more familiar/comfortable for them in System Settings → Keyboard.

cassidyjames avatar Sep 02 '20 16:09 cassidyjames

Sounds like a sane change. I think Alt+Space is a good choice, personally.

tom-james-watson avatar Sep 02 '20 17:09 tom-james-watson

I agree with alt+space, as ctrl+space is very popular with 3rd party launchers like Synapse, Kupfer, GNOME Do, and others (and I think some don't allow to change the combo).

janxkoci avatar Sep 03 '20 15:09 janxkoci

I've not tried it but from some blog posts I read, it sounds like this issue has been fixed and that alt+shift+tab should now work?

tom-james-watson avatar Dec 01 '21 08:12 tom-james-watson

Is there an update on this? It looks like @cassidyjames was proposing Alt+Space. Would a PR be welcome to implement this? As far as I can tell it should be a few lines in this repo? If that's the case I'm happy to open one (but if it's much more than that I'm afraid I may need help or to pass it off).

cmonagle avatar Feb 16 '22 23:02 cmonagle