After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 746605 - Keyboard layout changes on the lock screen/in ssh passphrase dialogs/...
Keyboard layout changes on the lock screen/in ssh passphrase dialogs/...
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: keyboard
3.15.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2015-03-22 14:07 UTC by Christophe Fergeau
Modified: 2015-03-30 15:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
status/keyboard: Only reset the MRU list when returning to normal mode (1.59 KB, patch)
2015-03-28 18:18 UTC, Rui Matos
none Details | Review
status/keyboard: Backup the whole MRU list while in password mode (3.46 KB, patch)
2015-03-30 12:35 UTC, Rui Matos
committed Details | Review

Description Christophe Fergeau 2015-03-22 14:07:51 UTC
I've got 3 layouts configured, fr (xkb), dvorak (xkb), and Russian (ibus). The layout used by default (eg the one which is selected in gdm after a reboot) is fr, but I use dvorak as my main layout (ie I switch to dvorak as soon as I get to the login screen after a reboot, and use it exclusively).

On the lock screen/in ssh unlock dialogs/.., the layout switches automatically from dvorak to french, and switches back from french to dvorak as soon as the dialog goes away. Reverting commit d8ca37 from bug #730628 avoids that behaviour: the dvorak layout is kept on these screens/dialogs.
Comment 1 Christophe Fergeau 2015-03-26 09:13:30 UTC
Seems to happen too when focusing a password field in my browser. This is really disturbing as I can type the username using my regular layout, and when moving to the password field, the layout is silently changed (save for the update of the top right layout status). Then I type the password using the same layout as the one used to type the login, and I'm left wondering why the password is not working.
(this might be a different bug than this one, let me know if I should open a new one).
Comment 2 Rui Matos 2015-03-28 18:18:05 UTC
Created attachment 300523 [details] [review]
status/keyboard: Only reset the MRU list when returning to normal mode

Resetting the MRU list when going into password mode (i.e. no IBus)
means that the input source currently being used will be switched to
the first non-IBus source which can be very disruptive for
users. Let's avoid this by only resetting the MRU list when going back
to normal mode since in that case we have the source that was being
used before entering password mode as a backup to activate.
--

Hi Christophe, does this work as you'd expect?
Comment 3 Christophe Fergeau 2015-03-30 10:26:59 UTC
This works much better so far and no longer changes my keyboard layout on password prompts, thanks!
One small bug I noticed, my layout are fr, en (dvorak), and russian (ibus) in that order in the top left layout menu. I'm initially in en, switch to Russian, then go to a webpage with login/password text entries. In the login text entry, layout is Russian, moving to the password entry switches to en as expected as this is the purpose of the code. Moving back to the login text entry switches back to Russian, which is also what I'd expect. Moving again to the password entry changes to fr and not en which is unexpected (but a very minor issue for me).
Comment 4 Rui Matos 2015-03-30 12:35:29 UTC
Created attachment 300586 [details] [review]
status/keyboard: Backup the whole MRU list while in password mode

Instead of saving only the current input source when entering password
mode, let's save the whole MRU list so that we can restore it when
returning to normal mode.

This is closer to user expectations since password mode is a transient
and short lived state.
--

Right, I think this is the proper solution. Does it work better?
Comment 5 Christophe Fergeau 2015-03-30 13:30:54 UTC
This patch works nicely for me yeah. I noticed that on GNOME password dialogs (ssh key unlock, VPN, ...), you can only switch between en/fr, ru is not an option, I didn't pay attention how it was before this patch, and I don't know if you are supposed to be able to switch to ru in there.
Comment 6 Rui Matos 2015-03-30 15:54:52 UTC
(In reply to Christophe Fergeau from comment #5)
> This patch works nicely for me yeah.

Cool, thanks for testing!

> I noticed that on GNOME
> password dialogs (ssh key unlock, VPN, ...), you can only switch
> between en/fr, ru is not an option, I didn't pay attention how it
> was before this patch, and I don't know if you are supposed to be
> able to switch to ru in there.

Right, that's the intended behavior for now. It's debatable but if we
want to allow some IBus engines in password fields we'll need more API
in IBus which is out of scope for this bug.

Attachment 300586 [details] pushed as 2f228e2 - status/keyboard: Backup the whole MRU list while in password mode