GNOME Bugzilla – Bug 746605
Keyboard layout changes on the lock screen/in ssh passphrase dialogs/...
Last modified: 2015-03-30 15:54:56 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.
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).
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?
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).
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?
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.
(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