Bug #11042

alt + shift switch the keyboard layout without indicating it in the keyboard layout menu

Added by segfault 2016-02-02 12:14:38 . Updated 2016-03-09 19:46:01 .

Status:
Resolved
Priority:
Elevated
Assignee:
Category:
Internationalization
Target version:
Start date:
2016-02-02
Due date:
% Done:

100%

Feature Branch:
bugfix/11042-disable_alt+shift_shortcut
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Deliverable for:

Description

In Tails 2.0, alt+shift switch the keyboard layout without changing the layout shown as default in the keyboard layout menu in the top bar.

I think this might also be the cause of what alant experienced in Bug #10961.

I set priority to elevated because I saw this happen to myself and other people and it’s very confusing.


Subtasks


Related issues

Related to Tails - Bug #10913: Keyboard layout keyboard shortcut has changed Resolved 2016-01-12

History

#1 Updated by segfault 2016-02-02 12:17:34

A workaround is to disable this shortcut with this command:

gsettings set org.gnome.desktop.input-sources xkb-options “[‘grp:shifts_toggle’]”

Or if you find the “both shifts toggle” shortcut also annoying (I do), you can disable them too with

gsettings set org.gnome.desktop.input-sources xkb-options “[]”

#2 Updated by intrigeri 2016-02-02 13:12:21

  • related to Bug #10913: Keyboard layout keyboard shortcut has changed added

#3 Updated by intrigeri 2016-02-02 13:14:35

  • Category set to Internationalization
  • Status changed from New to Confirmed
  • Assignee set to intrigeri
  • Target version set to Tails_2.2

I’ll try to have a look but no promise.

#4 Updated by nukk 2016-02-02 19:37:11

I can confirm this asa well, seeing it on 2 different installations. The double-shift key to ‘escape’ back to normal works about 50% of the time, but the pulldown on the toolbar is best.

#5 Updated by sajolida 2016-02-03 12:09:23

I hate this!

In Keyboard → Shortcuts, I see “Modifiers-only switch to next source” set to “Alt+Shift”. If I disable this I get rid of this shortcut, though I don’t understand the name “modifiers-only” as it’s modifying visible characters as well?

Do Alt+Shift does the same in Debian outside of Tails?

#6 Updated by segfault 2016-02-03 21:33:11

  • Assignee changed from intrigeri to segfault

#7 Updated by intrigeri 2016-02-04 19:43:34

> Assignee changed from intrigeri to segfault

Thank you!

#8 Updated by sajolida 2016-02-05 10:57:20

Dumping here what’s relevant in the February meeting notes:

Right-now there as three keyboard shortcuts to change keyboard layout:

  • Super+Space which is provided by GNOME.
  • Shift+Shift which is custom to Tails (added in e492749). segfault will see whether we should get rid of this one as well.
  • Alt+Shift which is custom to Tails (added in 370f48c). Saying that this is the default in Windows might have been an ok argument at some point.

Seeing that alt + shift switch the keyboard layout without indicating it in the keyboard layout menu, GNOME is giving it a different meaning by default: Alt+Shift shortcut will be removed. segfault will submit a branch.

#9 Updated by segfault 2016-02-09 22:11:36

  • Status changed from Confirmed to Fix committed
  • QA Check set to Ready for QA

I submitted a branch here:
https://gitlab.com/segfault_/tails/commit/1872789a92916ea6ecf15b4da30f4a0752430cc0

I tried to submit it to https://labs.riseup.net/code/git/tails.git but got an “authentication failed” error, so I guess I don’t have the required permissions. Can you use the branch from gitlab.com? Or should I push this somewhere else?

#10 Updated by intrigeri 2016-02-10 10:54:27

  • Status changed from Fix committed to In Progress

> I submitted a branch here:

Cool! Please read https://tails.boum.org/contribute/merge_policy/#submit at some point :)

> I tried to submit it to https://labs.riseup.net/code/git/tails.git but got an “authentication failed” error, so I guess I don’t have the required permissions.

This repo is indeed only used for Redmine integration. Nobody actually pushes there.

> Can you use the branch from gitlab.com?

A branch hosted on gitlab is fine, yes :)

So please point us to a branch that we can merge (instead of a commit).

#11 Updated by segfault 2016-02-10 14:31:24

  • Assignee deleted (segfault)
  • Feature Branch set to bugfix/11042-disable_alt+shift_shortcut

> Please read https://tails.boum.org/contribute/merge_policy/#submit at some point :)
Ok, I read it already but I see I forgot a few things :)

> So please point us to a branch that we can merge (instead of a commit).
This is the branch that contains the commit:
https://gitlab.com/segfault_/tails/tree/bugfix/11042-disable_alt+shift_shortcut

#12 Updated by intrigeri 2016-02-10 15:11:47

  • Feature Branch changed from bugfix/11042-disable_alt+shift_shortcut to segfault:bugfix/11042-disable_alt+shift_shortcut

#13 Updated by sajolida 2016-02-12 14:41:52

  • Assignee set to segfault
  • QA Check changed from Ready for QA to Info Needed

Yes, we can use the branch from gitlab. I fetched it and pushed it to our main repo. This should trigger an automatic build of the branch (with ISO image available on nightly.tails.boum.org).

If I understand correctly, you’re only removing our custom “alt_shift_toggle” but not our custom “shifts_toggle”, introduced in e492749 (again, if I understand correctly).

Did you investigate whether the reasons behind e492749 (5 years ago) are still relevant nowadays? or whether we could remove this delta as well and only rely on the default GNOME shortcuts?

I think you said “shifts_toggle” was bothering you as well during the meeting, so I’m wondering where you found a good reason to keep this delta. I know I was the one to propose removing them one by one, but by then I think I haven’t read e492749.

#14 Updated by segfault 2016-02-12 20:29:55

> If I understand correctly, you’re only removing our custom “alt_shift_toggle” but not our custom “shifts_toggle”
correct

> Did you investigate whether the reasons behind e492749 (5 years ago) are still relevant nowadays? or whether we could remove this delta as well and only rely on the default GNOME shortcuts?
I didn’t investigate this, because I think it might actually be better to keep it and remove the additional keyboard layouts (Feature #11048). I just commented there why I think this would be the best way to go.

#15 Updated by sajolida 2016-02-13 16:28:48

I understand why you are in favor or removing unjustified layout on
Feature #11048 (and I agree with you), but I don’t see in your comments on
Feature #11048 why you suggest it would be better to keep shifts_toggle.

I’m personally in favor of both:

  • Removing unjustified layouts in Feature #11048 to remove noise.
  • Getting rid of custom shortcuts (shifts_toggle) unless we need it for
    something, in order to have one shortcut for one thing and reduce our
    delta with GNOME.

#16 Updated by segfault 2016-02-20 10:31:45

> I understand why you are in favor or removing unjustified layout on
> Feature #11048 (and I agree with you), but I don’t see in your comments on
> Feature #11048 why you suggest it would be better to keep shifts_toggle.

I thought it might be more convenient for Tails users who are used to the existing shortcuts to keep them (even alt+shift, if we find a way to solve this bug without removing it). If we solve Feature #11048 then users who don’t use multiple layouts won’t be annoyed by additional layout-switching shortcuts, because they will have no effect for them.
But I have no strong opinion on this. If you think it would be better to remove unnecessary shortcuts, I’m ok with removing shifts_toggle too.

#17 Updated by sajolida 2016-02-21 12:47:49

Thanks for the clarification. So I think I have no strong opinion on keeping or removing shifts_toggle. I’ll let you do whatever you prefer :)

Regarding alt+shift, it has at least another clear downside as it prevents switching window backward with Alt+Shift+Tab, so I’m really in favor or removing it.

#18 Updated by segfault 2016-02-29 15:12:38

  • QA Check changed from Info Needed to Ready for QA

I suggest we only remove alt + shift in Tails 2.2 and wait for more info on Feature #11048. If it turns out that Feature #11048 won’t be implemented any time soon then we remove the shifts_toggle shortcut too.

> This is the branch that contains the commit:
> https://gitlab.com/segfault_/tails/tree/bugfix/11042-disable_alt+shift_shortcut

#19 Updated by segfault 2016-02-29 15:14:36

  • Assignee deleted (segfault)

#20 Updated by intrigeri 2016-02-29 17:00:30

  • Assignee set to anonym

Freeze exception?

#21 Updated by anonym 2016-03-03 12:13:01

  • QA Check changed from Ready for QA to Dev Needed
  • Type of work changed from Code to Discuss

intrigeri wrote:
> Freeze exception?

I’m not sure. I’ve done quite a bit of research, and here are my findings in bullet points, because I cannot find the power to summarize this into somethings comprehensible:

  • For me, in Tails, Pressing LAlt -> LShift does not work. However, LShift -> LAlt work reliably.
  • Pressing both Shift:s in any order works.
  • In Windows 8, the LAlt LShift and both-Shifts shortcuts are not enabled by default, but is available as options.
  • In all (I think) versions of Windows, the order one presses LAlt and LShift does not matter when used as the shortcut. The documented way is LAlt first, though, so presumably that is what users are trained to do, and why users have been observed to have trouble with our LShift + LAlt (not the order!) shortcut in Tails.
  • In Windows 8, Win/Meta Space opens a nice layout switcher which, and this shortcut is enabled by default. Adding in a Shift reverses the order we traverse the list of layouts. I.e. same as in GNOME.
  • In Windows <8, LeftAlt + LShift and both- Shifts are the default and only shortcuts.

Given all this, I think we can drop the LShift + LeftAlt and both-Shifts shortcuts and only support Meta + Space, mostly because the order issue. I think the usage of Windows <8 is about twice as large as usage of Windows >=8, and most of the latter group has experience from <8, so this may be an unknown shortcut to quite a few users. I doubt documentation would help much. However, if Microsoft could be so bold to change the default and drop the old shortcut, perhaps GNOME’s decision to do the same is sound and we can follow them.

Let’s discuss this quickly during this evening’s contributors meeting.

#22 Updated by anonym 2016-03-03 22:33:04

  • Assignee changed from anonym to segfault
  • Type of work changed from Discuss to Code

anonym wrote:
> Let’s discuss this quickly during this evening’s contributors meeting.

We decided to drop our custom shortcuts and go with GNOME’s and Windows >=8’s default only, of Meta + Space. We’ll have a freeze exception for this, so it’ll land in Tails 2.2.

#23 Updated by segfault 2016-03-04 00:07:20

> We decided to drop our custom shortcuts and go with GNOME’s and Windows >=8’s default only, of Meta + Space. We’ll have a freeze exception for this, so it’ll land in Tails 2.2.

I pushed an updated commit to https://gitlab.com/segfault_/tails/tree/bugfix/11042-disable_alt+shift_shortcut

#24 Updated by segfault 2016-03-04 00:23:42

  • Assignee changed from segfault to anonym
  • QA Check changed from Dev Needed to Ready for QA

#25 Updated by emmapeel 2016-03-04 09:54:54

On my laptop, LAlt+Lshift does nothing (no change of layout, no change of icon)
and Lshift +LAlt changes the layout and the icon.

#26 Updated by anonym 2016-03-05 00:40:32

  • Assignee changed from anonym to segfault
  • % Done changed from 0 to 30
  • QA Check changed from Ready for QA to Dev Needed

Sadly your branch breaks the build:

[...]
Updating the system DConf databases
unable compile /etc/dconf/db/local.d: /etc/dconf/db/local.d/00_Tails_defaults: [org/gnome/libgnomekbd/keyboard]: options: invalid value: [] (0-2:unable to infer type)
chmod: cannot access '/etc/dconf/db/local': No such file or directory
E: config/chroot_local-hooks/20-dconf_update failed (exit non-zero). You should check for errors.
[...]

Apparently dconf doesn’t like empty lists since it cannot infer the type. Wow.

I was actually going to suggest that removing the affected section probably is a cleaner idea than what you proposed (and we avoid overwriting GNOME defaults I guess), but I then thought it’d be better to refrain from such nitpicking to make things move forward faster. But it seems I’ll get it any way. :)

I could of course do this myself, but I like the idea of giving you the opportunity to finish what you started. You have until ~noon (UTC) Monday to push a fix.

#27 Updated by anonym 2016-03-07 14:45:58

  • Status changed from In Progress to Fix committed
  • Assignee deleted (segfault)
  • % Done changed from 30 to 100
  • QA Check changed from Dev Needed to Pass
  • Feature Branch changed from segfault:bugfix/11042-disable_alt+shift_shortcut to bugfix/11042-disable_alt+shift_shortcut

anonym wrote:
> I could of course do this myself, but I like the idea of giving you the opportunity to finish what you started. You have until ~noon (UTC) Monday to push a fix.

So I merged your branch with a fixup commit on top. Still, the important part was the reporting, research and discussion, so thanks for your help there, segfault!

#28 Updated by segfault 2016-03-07 15:52:30

  • Status changed from Fix committed to In Progress

Applied in changeset commit:e8477044ca44d2f7cd409e9eb9472a12c30bd326.

#29 Updated by anonym 2016-03-07 15:52:31

  • Status changed from In Progress to Fix committed

Applied in changeset commit:58a7e7474ceac797a58cf702f676d3dcf3c56782.

#30 Updated by anonym 2016-03-08 19:02:51

  • Status changed from Fix committed to Resolved

#31 Updated by segfault 2016-03-09 19:46:01

> Sadly your branch breaks the build:
>
> […]
> Updating the system DConf databases
> unable compile /etc/dconf/db/local.d: /etc/dconf/db/local.d/00_Tails_defaults: [org/gnome/libgnomekbd/keyboard]: options: invalid value: [] (0-2:unable to infer type)
> chmod: cannot access ‘/etc/dconf/db/local’: No such file or directory
> E: config/chroot_local-hooks/20-dconf_update failed (exit non-zero). You should check for errors.
> […]
>
> Apparently dconf doesn’t like empty lists since it cannot infer the type. Wow.
>
> I was actually going to suggest that removing the affected section probably is a cleaner idea than what you proposed (and we avoid overwriting GNOME defaults I guess), but I then thought it’d be better to refrain from such nitpicking to make things move forward faster. But it seems I’ll get it any way. :)
>
> I could of course do this myself, but I like the idea of giving you the opportunity to finish what you started. You have until ~noon (UTC) Monday to push a fix.

Oh, I just read this. I’m sorry, I was busy the last couple of days.
I thought it would work with the empty list, because I always removed the shortcuts with this on startup:

gsettings set org.gnome.desktop.input-sources xkb-options “[]”

I should have tested it with dconf update. Thanks for fixing it.
I agree that it is also cleaner to remove the whole section.