Bug 873849

Summary: no keyboard shortcut for toggling keyboard layouts
Product: [Fedora] Fedora Reporter: Mads Kiilerich <mads>
Component: gnome-settings-daemonAssignee: Bastien Nocera <bnocera>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: alexander.wajda, a.velios, awilliam, bnocera, control-center-maint, covex, i18n-bugs, itayshom, kem, keramidasceid, lsatenstein, mads, mfabian, mkasik, mongolie2006-fedora, mshao, panormitis, raina, rstrode, stas-fomin, techtonik, tflink, thib, tiagomatos, tiktokoptik, vleolml, vlisivka
Target Milestone: ---Keywords: CommonBugs, i18n
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: https://fedoraproject.org/wiki/Common_F18_bugs#gnome-layout-switch
Fixed In Version: F19+ Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-05 06:23:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 752665    

Description Mads Kiilerich 2012-11-06 20:00:07 UTC
There used to be keyboard shortcuts for switching between the configured keyboard layouts. That is an important feature for some multilingual keyboard users. The default shortcut has been shift+capslock for some years.

In f18

* there is apparently no keyboard shortcut for toggling keyboard layouts

* "shortcut settings" do not allow shift+capslock to be used ... and it is not obvious which shortcut is unused and that the muscle memory should learn

* the settings are no longer synced with X; setxkbmap -print used to show for instance
  xkb_symbols { include "pc+us+dk:2+inet(evdev)+group(shift_caps_toggle)" };
now it just says
  xkb_symbols { include "pc+us+inet(evdev)" };

Cutting the connection with the X keyboard handling might make sense ... but please make sure there still is a shortcut for toggling keyboard layouts. And please try to preserve the old one if possible.

control-center-3.6.2-1.fc18.x86_64

Comment 1 Mads Kiilerich 2012-11-08 19:00:24 UTC
https://bugzilla.gnome.org/show_bug.cgi?id=686613 has a patch that makes it possible to preserve the existing user experience by using shift+capslock to toggle.

Please consider that making that the default - that will give non-us users a less disruptive user experience. https://bugzilla.gnome.org/show_bug.cgi?id=669742 is related.

I consider this very nice to have for f18.

Comment 2 luavi1 2012-11-16 00:27:35 UTC
The keyboard switching with shift-CAPS is not functioning and the maintainer of the repository only advises shell-based solutions which common users are not able to use.

Shift-CAPS is one of the more ergonomic shortcuts and should be configurable.

Comment 3 Hedayat Vatankhah 2012-11-28 19:38:32 UTC
Fedora 18 Beta presents a very inconsistent experience in this regard. I can say that it is almost completely broken:
1. I installed Fedora 18 Beta. I selected Persian language in the first screen of the installer. 
2. In the installer, the keyboard layouts were correctly setup (I had both a us keyboard and an ir keyboard, and, surprisingly, I could switch between them using alt+shift which is my favorite default!). 
3. The same thing happened in firstboot, and I was completely happy with it.
4. I logged into my Gnome desktop. And when I decided to switch the keyboard layout I found some unexpected surprises:
  - First, the layout was incorrectly setup. Instead of having English + Persian (Iranian) keyboard layouts which was selected automatically and used in Anaconda and firstboot, Gnome was using English + Afghan (It is still Persian but different from default Persian (Iranian) layout) which was not expected. More surprisingly, I couldn't switch the layouts using Alt+Shift and other usual key bindings (Shift+Capslock), while it must be Alt+Shift which was configured in Anaconda. 
Then I ran Control Center. Interestingly, no keyboard shortcut was there for changing keyboard layouts. More interestingly, when I tried to set ANY usual key bindings for changing keyboard layouts, I couldn't. It doesn't accept most combinations of control keys (Alt+Shift, LAlt+RAlt, Shift+Caps, Ctrl+Shift and so on), and it only accepts when I add a letter key in the mix (e.g. Alt+Shift+O), which is very weird for changing keyboard layouts.

5. Anaconda has created correct keyboard layout settings file for Xorg in /etc/X11/xorg.conf.d/

Actual Results:
Gnome doesn't honor systemwide settings for keyboard layouts, which results in an inconsistent behavior.

Expected Results:
Gnome (and any other Desktop environments) must completely follow systemwide configuration of keyboard layouts. It can use its own layout management system, and provide the ability for the user to have its preferred settings, but it must follow system configuration unless a user has changed its layout settings.

Comment 4 Nikos Roussos 2012-11-30 15:43:09 UTC
One temporary solution is to install gnome-tweak-tool. Under "Typing" category you can choose a layout switch shortcut on the last option ("Modifiers-only input sources switch...")

Comment 5 Tim Flink 2012-12-13 09:29:54 UTC
This bug has been proposed as NTH for Fedora 18 final. If accepted as NTH, a fix for this would be considered for pushing to stable past the change freeze. More details about the NTH process is available at http://fedoraproject.org/wiki/QA:SOP_nth_bug_process .

Since there are so may NTH bugs to review, we'd like to find out if there is developer support for accepting this as NTH. If accepted as NTH, would a fix likely be ready in time to be included in Fedora 18 (currently scheduled for 2013-01-08)?

Developers, please respond soon as we will be using these responses to prioritize the order in which we review the proposed NTH bugs.

Comment 6 Leslie Satenstein 2012-12-18 14:15:30 UTC
Please review keyboard settings as found in anaconda for Fedora 17.

I need to have the euro key. I could make it available with keyboard settings from Fedora 17, but it is missing in anacaonda and keyboard settings in Fedora 18 Gnome.

I will be installing KDE to determine if I can setup the keyboard characters that way.

Comment 7 Adam Williamson 2012-12-19 20:01:05 UTC
Discussed at 2012-12-19 NTH review meeting: http://meetbot.fedoraproject.org/fedora-bugzappers/2012-12-19/f18final-blocker-review-6.2012-12-19-17.02.log.txt . Agreed that there isn't really enough info here to make a decision.

It's clear what the reporter wants, but we have no idea if that matches up with the expectations of the GNOME developers. It would help to have input from GNOME / desktop teams here. Questions:

1: Are there supposed to be any default key combinations for switching keyboard layout 'out of the box' in GNOME, such as the reporter expects (alt-shift, shift-caps)?

2: Should it be possible to configure these 'standard' combos in gnome-control-center?

I think the stuff about the offered keyboard layouts themselves being incorrect should be separated out - it may relate to https://bugzilla.redhat.com/show_bug.cgi?id=873103 , which I still have on my 'to investigate' list.

Comment 8 Mads Kiilerich 2012-12-20 22:38:20 UTC
(In reply to comment #7)
> 1: Are there supposed to be any default key combinations for switching
> keyboard layout 'out of the box' in GNOME, such as the reporter expects
> (alt-shift, shift-caps)?

Upstream https://bugzilla.gnome.org/show_bug.cgi?id=669742 is still unresolved, waiting for the perfect solution ;-)

> 2: Should it be possible to configure these 'standard' combos in
> gnome-control-center?

I think it now is possible to configure the 'dead' key combinations in a not completely obvious way in gnome-tweak-tool.

Enabling it by default should thus be a short .gschema.override file.

Comment 9 Hedayat Vatankhah 2012-12-22 12:43:31 UTC
@Adam: Anyway, GNOME should honor "System"'s default settings (which are set by Anaconda), but it doesn't.

Comment 10 Adam Williamson 2013-01-12 03:09:03 UTC
More data on this I found in anaconda layout testing: anaconda's behaviour has changed in F18. In F17 and earlier, when you picked a keyboard layout where it is common to have both the 'native' layout and the U.S. layout enabled and switch between them in order to be able to input both sets of characters, anaconda - actually system-setup-keyboard - would do this for you: it'd configure both X layouts, and set up 'both shift keys' (not shift+capslock) as a layout switch combo in X configuration.

F18 anaconda doesn't do either of these things for you. system-setup-keyboard is dead and wasn't really replaced directly in anaconda, it has no 'special knowledge' about what configuration 'should' be done for what keyboard layouts any more. It simply has a Keyboard spoke which lists all available X keyboard layouts (well, actually, it's missing one or two, but this is just a bug) and lets you enable as many of them as you want. It lets you configure a layout switch keyboard combination, too, but it does _not_ configure one by default.

Configuration you do on this page is respected in the installed system - it writes a proper /etc/X11/xorg.conf.d snippet containing all the layouts you chose, and the keyboard switch combination if you chose one. This configuration will be respected in GNOME. But if you don't explicitly go into the keyboard spoke and configure a layout switch combination during install, you won't have one.

Comment 11 Adam Williamson 2013-01-12 03:16:31 UTC
now I re-read the bug, Nikos found GNOME does *not* respect the X config written by anaconda. I thought it did in my testing, but I'll have to double-check that.

Comment 12 Hedayat Vatankhah 2013-01-12 14:34:38 UTC
Notice that Anaconda DOES select a key combination for layout switching: in my case (when I select "Persian" language in the first Anaconda screen), anaconda automatically Adds both English and Persian keyboard layouts for me, and selects Alt+Shift as the key combination to switch between layouts. So, without any configuration I can use Alt+Shift to switch between English and Persian layouts. The same thing works in firstboot page (so I can enter my name in Persian and my username in English using Alt+Shift). Unfortunately, Gnome doesn't care about system configuration which is really bad (selfish!).

Comment 13 Adam Williamson 2013-01-14 23:13:18 UTC
hedayat: are you sure you weren't testing the Beta? This behaviour changed completely between Beta and Final. What you're describing sounds like how the Beta behaved, what I described was Final behaviour.

Comment 14 Hedayat Vatankhah 2013-01-15 08:52:18 UTC
I saw the same behavior in RC2 of final release, which should have the same Anaconda as Final release AFAIK. And I see the same behavior in Gnome (adding Afghan instead of Persian without any key combination). 

And after working more seriously with Fedora 18's Gnome, I should say that the default behavior of not allowing modifier-only key combination for layout switching is completely broken and it must be fixed in the Fedora 18: consider I use Alt+Shift+Z for changing keyboard layout. When I switch to a layout other than English, "Z" key no longer exists and so I can not change back to English! Therefore, I should find a key which represents a single character in both layouts (I found '|' character).

Comment 15 abyss.7 2013-01-15 09:05:56 UTC
(In reply to comment #14)
> I saw the same behavior in RC2 of final release, which should have the same
> Anaconda as Final release AFAIK. And I see the same behavior in Gnome
> (adding Afghan instead of Persian without any key combination). 
> 
> And after working more seriously with Fedora 18's Gnome, I should say that
> the default behavior of not allowing modifier-only key combination for
> layout switching is completely broken and it must be fixed in the Fedora 18:
> consider I use Alt+Shift+Z for changing keyboard layout. When I switch to a
> layout other than English, "Z" key no longer exists and so I can not change
> back to English! Therefore, I should find a key which represents a single
> character in both layouts (I found '|' character).

Want to mention - I've issued separate bug https://bugzilla.redhat.com/show_bug.cgi?id=889036 - about this exact problem.

Comment 16 Adam Williamson 2013-01-15 18:25:07 UTC
hedayat: ah - it does that if you *don't* check the 'set layout to default for yadda yadda' checkbox. That's interesting. I thought it was just setting the U.S. layout in that case, but now I look, it gives the Beta behaviour of adding both layouts with U.S. as the default - for _all languages_, even languages where it's not normally the case that you'd add a U.S. layout (like French). I'll have to amend the commonbugs a bit. thanks.

Comment 17 Alex Wajda 2013-01-19 22:17:30 UTC
I agree, this is an issue!
What was the motivation for disallowing the key combinations with modifiers only? What was wrong with the good old Shift+CAPS?

Please, return the modifier only combinations, it used to be very convenient! The new way just kills the non-English people user experience right from the first log in attempt. It sounds like "What? I just need to switch the layout! Shouldn't it be a super easy thing?... It doesn't allow me to use Alt+Shift or Ctrl+Shift! What should I do know?".

Comment 18 techtonik 2013-01-24 11:00:05 UTC
+1 for Alt-Shift by default. IIRC, this matches Windoze behaviour and makes it easier for people without Linux background to adopt in Fedora.

Comment 19 Leslie Satenstein 2013-01-24 15:03:48 UTC
While on the keyboard switching, please review the layout tab for keyboards currently in use.  

Fedora 17 displays the PC105 keyboard correctly, with the extra key to the left of the Z key.  That key (CA) shows « » °    (lower, upper, alt-3)

with USA English selected we see  < > deadkey (lower, upper alt-3)
We need the euro symbol key to be on the E or the 5 key at the alt-3 level. 

If this is a separate bug, please advise. This 873849 is about keyboard switching and I hope the keyboard layout and the euro key.

The Spanish latam keyboard has the Euro on the E key.
(I use Ca and Latam) and do not use English(USA).

Comment 20 Adam Williamson 2013-01-25 00:06:36 UTC
Leslie: of course it's a separate bug. If it's a different thing, it's a different bug.

Comment 21 yasen 2013-01-27 08:32:50 UTC
Nikos Roussos, thanks for the advice. That's a nasty bug :)

Comment 22 Vassili Leonov 2013-02-01 20:37:57 UTC
I fully agree with this bug - I was not able to figure out 

how to make keyboard layouts switch on "both shifts" combination

 for example. This is very serious bug, since using mouse to switch keyboard layout when typing in more then one languages impedes operator performance immensely.

PLEASE PROVIDE SOME WORKAROUND, like edit/create some file(s) from the console.

Thank you.

Comment 23 Adam Williamson 2013-02-01 22:27:14 UTC
There is already a workaround mentioned higher up in the comments. You can set a modifier-only shortcut from gnome-tweak-tool. This is documented in more detail on the common bugs page. https://fedoraproject.org/wiki/Common_F18_bugs#gnome-layout-switch

Comment 24 Leslie Satenstein 2013-02-08 00:24:06 UTC
The Euro symbol and the ² ³ ¼ ¾ are missing from the virtual console layout.

The Euro should be bound to the E key at level 3.  

Keyboards on newer PĈs have the Euro symbol on the E key.  

The ¤ (currency symbol remains on the level-3   5-key.

This is partially reported in the link 

 https://fedoraproject.org/wiki/Common_F18_bugs#gnome-layout-switch

Comment 25 Adam Williamson 2013-02-13 22:33:07 UTC
Again, that is nothing to do with this bug. The layouts you're getting are the standard kbd and xkb layouts, we don't patch them downstream. In theory you could get the kbd layout changed upstream, but that is very unlikely to happen these days. In F19 it's likely we'll just be using converted xkb layouts on the console, so inconsistencies between the kbd and xkb layouts should go away. If it all works out.

Comment 26 Athanasios Velios 2013-02-25 10:54:44 UTC
(In reply to comment #23)
> There is already a workaround mentioned higher up in the comments. You can
> set a modifier-only shortcut from gnome-tweak-tool. This is documented in
> more detail on the common bugs page.
> https://fedoraproject.org/wiki/Common_F18_bugs#gnome-layout-switch

The workaround works, but not when the user tries to switch layout in the Activities screen.

Comment 27 Leslie Satenstein 2013-03-28 01:44:32 UTC
I have requested the Quebec (Canada) provincial government to update their CA(FR) layout standard. 

I have explained to them that the US govenment has a keyboard layout with the Euro key € on the E key. Newer USA keyboards that are sold in Canada already have the Euro on the E key.  

I am asking the Canadian government to go along with this decision, as it means that manufacturers will only have one keytop to change.

If it is standardized, the tweak for Euro will have to respect the two government's standardized Keyboard layout. 

 And please note, between the Z key and the shift key is an additional key for the frenh <<  and >>  

The latam keyboard layout also has this extra key as < > and |

Comment 28 Rui Matos 2013-04-02 23:08:10 UTC
FYI, the patches I intend to land upstream (hopefully in time for F19) will make GNOME respect the layout switching shortcut specified in xorg.conf.

Comment 29 Volodymyr M. Lisivka 2013-04-14 06:16:16 UTC
I am able to set switch key to Right Ctrl using gnome-tweak-tool, but I am unable to set group LED indicator to indicate current keyboard layout using Scroll Lock led: I selected "Scroll Lock" for typing/grp_led, but nothing happens.

It is hard to notice two letter keyboard layout code in the middle of toolbar. Hardware indication is much better for that purpose. IMHO, it should be default choice for keyboard layouts which are toggled.

Comment 30 Fiable.biz 2013-04-19 08:10:13 UTC
The flag + 2 letters, as proposed in KDE (and by default in Mageia), is visually much better than 2 letters alone, and better than a hardware led, which, however, doesn't help when one uses 3 layouts or more, as I do. People knowing how to type correctly look at the screen, not at the keyboard. But the visual indicator is another subject. The urgent thing is that we can change layout quickly through a shortcut.

Comment 31 Volodymyr M. Lisivka 2013-04-28 09:43:16 UTC
The problem with new switcher is that it too slow — I see significant delay between switches (about 0.3-0.5s on single core 2GHz CPU with 2GB of RAM), so I often type wrong letter after switch, i.e. when I typing in Latin (en_US layout), then switching to Ukrainian and typing, first typed letter is Latin, so I pressing backspace and switching again and see Latin letter again, so I  pressing backspace and switching again and see Latin letter again, ...

I am curious why XKB is dumped. I am author of original XKB configuration parsing code for KDE, which I wrote to stop attempts to split Ukrainian keyboard layout definition file to satisfy KDE keyboard switcher in 2001, then it was ported to Gnome. It worked very well all these years. :-/

Comment 32 Adam Williamson 2013-05-03 00:27:53 UTC
Volodymyr: not sure what you mean by "XKB is dumped", exactly. We are still using XKB layouts - it's the old kbd layouts we're dropping - and you can still specify switcher keys and other options in an X config file. It seems that GNOME sometimes or always overrides those settings, but that's not quite "XKB is dumped" - it's only a GNOME thing, X itself and other desktops still respect those settings. We have built various bits on _top_ of the X layer, though, mainly to handle languages for which simply fiddling with keyboard layouts isn't enough; stuff like the CJK languages which need a whole lot of extra smarts.

fiable: Fedora is kind of allergic to flags as there's a whole *pile* of sensitive political questions that pop up as soon as you start displaying flags. Just try and decide what flag we should display for the main variants of Chinese, fr'instance.

Comment 33 Adam Pribyl 2013-10-23 07:29:23 UTC
One year later and the keyboard switching in gnome is still broken on F18.

Comment 34 Adam Williamson 2013-10-23 08:18:42 UTC
Upstream GNOME pretty much stops updating older releases after one or two point releases. I wouldn't hold your breath for further changes to GNOME...3.6, was it? that was in F18.

Comment 35 Fedora End Of Life 2013-12-21 09:18:06 UTC
This message is a reminder that Fedora 18 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 18. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '18'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 18's end of life.

Thank you for reporting this issue and we are sorry that we may not be 
able to fix it before Fedora 18 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior to Fedora 18's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 36 Jens Petersen 2014-01-22 06:41:48 UTC
Is this better in current Fedora releases?

Comment 37 Adam Williamson 2014-01-22 06:56:35 UTC
It's much better in current versions, yeah. They improved things in 19 and again in 20. It uses the X switcher key configuration if you don't supersede it, IIRC.

Comment 38 Fiable.biz 2014-01-30 13:35:41 UTC
Thank you. What is "the X switcher key" by default, how the end user is supposed to learn it, and how to modify it?
  Switching layout is an extremely frequent task in countries using a non-Latin script (small countries like China, Russia or Japan, for instance) so a key to do that is very needed, and it should be much easier than it is to get it work and... to know what key does this. (Shortcuts are useless if the end user don't know them.) In KDE, one just right-clicks on the language symbol, and chooses "configure"→ "layouts"→"main shortcut" to define a switcher key.

Comment 39 Mike FABIAN 2014-01-30 14:28:57 UTC
(In reply to Fiable.biz from comment #38)

>   Switching layout is an extremely frequent task in countries using a
> non-Latin script (small countries like China, Russia or Japan, for instance)

For Chinese and Japanese, one does not switch between keyboard layouts,
one has to use input methods to type these languages because they
have thousands of characters.

Comment 40 Adam Williamson 2014-01-30 21:05:31 UTC
yeah, CJK is entirely different.

The default switcher key combo is shown on the Keyboard spoke if you enter it. I'd kinda like if we could show it on the summary screen if you have multiple X layouts configured, but I don't think there's space for it :( The default in F20 is Alt+Shift - well, we set a default switcher combo if we configure multiple keyboard layouts for you (i.e. the non-ASCII native layout case), if you add multiple layouts yourself, we don't set one, but you can choose one. The 'Options' button on the keyboard spoke lets you pick a different switcher combo.

You can configure a different switcher combo in GNOME by going to Settings, Keyboard, Shortcuts, Typing - there are "Switch to next input source" and "Switch to previous input source" settings there, you can assign any combo you like.

I just tested an F20 GNOME install. It looks like, after installation, both the switcher combo configured by anaconda (which is an X setting, so applies to any graphical environment that doesn't explicitly override it) and GNOME's default combo - Super (Start) + Space - work. GNOME's combo pops up a neat little widget like the alt-tab one, the X combo doesn't.