Keyboard layout switcher shortcuts not working [$100]

Bug #1357895 reported by gorgekara
400
This bug affects 89 people
Affects Status Importance Assigned to Milestone
Gala
Fix Released
Medium
Santiago
Switchboard Keyboard Plug
Fix Released
Low
Santiago

Bug Description

After a clean install of freya i added a new language and changed the Key(s) to change layout to Alt+Shift and Left Alt + Left Shift.
None of these combination works and the keyboard layout stays the same. The only way i can switch the layout is by using the mouse.

Related branches

Revision history for this message
Oded Arbel (oded-geek) wrote :

Also affects me.

With English selected, setxkbmap -query shows:

rules: evdev
model: pc105
layout: us
options: grp:alt_shift_toggle,grp_led:scroll

Which doesn't seem correct because it doesn't have the additional layout (that is configured). After I change the layout using the graphical layout indicator, setxkbmap -query has this:

rules: evdev
model: pc105
layout: il,us
variant: ,
options: grp:alt_shift_toggle,grp_led:scroll

in both cases ALT+SHIFT does nothing.

Also, it may or may not be related, but selecting "Text Entry Settings..." from the keyboard layout indicator menu does nothing.

Revision history for this message
Igor Bogoslavskyi (zabugr-gmail) wrote :

Absolutely same behavior as by @Obded Arbel. Same output on the terminal.

Revision history for this message
ivan (heavy) wrote :

beta. Same problems.

Revision history for this message
Mohammad Alshehabi (moh-alshehabi) wrote :

it affect's me too, actually it's very annoying :(

tags: added: indicator keyboard
tags: added: layout
tags: added: freya
Revision history for this message
Marin (marin-roglev) wrote :

Same here, just one slight difference - I don't have the "options:" line at all when I run setxkbmap -query
rules: evdev
model: pc105
layout: us

And I have set the alt+shift and left alt+left shift to change the layout too.

Revision history for this message
Antony (curedia) wrote :

Same problem.
Keyboard layout switch doesn't work.

Revision history for this message
stormbreaker (georgyangelov) wrote :

+1. No keyboard shortcuts for layout change work. I use ctrl+shift but others don't work as well. Tested on two PCs - same behavior.

Revision history for this message
Ivan (vanek-2) wrote :

Same thing here.

Revision history for this message
George Sofianos (georgesofianosgr) wrote :

Affects me ass well. Surprisingly ctrl+space changes keyboard layout regardless my key configuration.

Revision history for this message
George Sofianos (georgesofianosgr) wrote :

Did a little research

In /src/Pages/Layout/settings.vala in luna branch key layout is saved at org.gnome.libgnomekbd.keyboard
In /src/Pages/Layout/settings.vala in trunk(freya) branch key layout is saved at org.gnome.desktop.input-sources

Currently the ctrl+space layout that works for me is saved in org.gnome.libgnomekbd.keyboard.
So the layout is read from org.gnome.libgnomekbd.keyboard but from the switchboard is saved at org.gnome.desktop.input-sources

Revision history for this message
stormbreaker (georgyangelov) wrote :

@georgesofianosgr Unfortunately this doesn't seem to be the case with me. No matter which I change, It doesn't work. If I change the int property for the current layout it changes, but the shortcuts themselves are not.

I am puzzled why the key combinations aren't getting to their handlers (wherever they are).

Revision history for this message
Sergey Zolotarev (szx) wrote :

Same problem here. Ctrl+Space works though.

tags: removed: indicator
tags: added: gnome-settings-daemon
removed: keyboard
Revision history for this message
Alexander Vasilyev (mizabrik) wrote :

I've done some research and figured out the reason: it is gnome-settings-daemon.
When layout is changed by xkb, it resets the layout to it's own. This behaviour is important to support IBus as input method.

The GNOME-way was to handle shortcuts with keyboard extension of GNOME Shell and change input method with DBus call.
Thus, ATM solution is to handle layout switch shortcuts in some other program (indicator-keyboard?).

Though, since GNOME 3.13.92 input sources handling was moved to keyboard extension of GNOME Shell completely, so if gnome-settings-daemon is updated (I hope, it will) it will be enough to apply settings from org.gnome.desktop.input-sources and use XKB grp: options.

BTW, Ctrl+Space changes IBus engines. You can change it in desktop.ibus.default.hotkey.triggers, but IBus engine is not displayed by indicator-keyboard, you cant change IBus engine while Slingshot is opened and modifiers-only shortcuts (alt+shift, ctrl+shift) are not supported.

Revision history for this message
Trevor Wermund (twermund) wrote : Re: [Bug 1357895] Re: Keyboard layout switcher shortcuts not working

You can also use gnome-tweak-tool to make most changes to the keyboard

On Wed, Nov 5, 2014, 5:30 PM Alexander Vasilyev <email address hidden>
wrote:

> I've done some research and figured out the reason: it is
> gnome-settings-daemon.
> When layout is changed by xkb, it resets the layout to it's own. This
> behaviour is important to support IBus as input method.
>
> The GNOME-way was to handle shortcuts with keyboard extension of GNOME
> Shell and change input method with DBus call.
> Thus, ATM solution is to handle layout switch shortcuts in some other
> program (indicator-keyboard?).
>
> Though, since GNOME 3.13.92 input sources handling was moved to keyboard
> extension of GNOME Shell completely, so if gnome-settings-daemon is
> updated (I hope, it will) it will be enough to apply settings from
> org.gnome.desktop.input-sources and use XKB grp: options.
>
> BTW, Ctrl+Space changes IBus engines. You can change it in
> desktop.ibus.default.hotkey.triggers, but IBus engine is not displayed
> by indicator-keyboard, you cant change IBus engine while Slingshot is
> opened and modifiers-only shortcuts (alt+shift, ctrl+shift) are not
> supported.
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1356731).
> https://bugs.launchpad.net/bugs/1357895
>
> Title:
> Keyboard layout switcher shortcuts not working
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/elementaryos/+bug/1357895/+subscriptions
>

Revision history for this message
Cody Garver (codygarver) wrote : Re: Keyboard layout switcher shortcuts not working

This code was recently changed, still happening? The update should go out within 24 hours of this comment

no longer affects: elementaryos
Changed in switchboard-plug-keyboard:
status: New → Incomplete
Revision history for this message
Alexander Vasilyev (mizabrik) wrote :

Switchboard-plug-keyboard is updated to 0.1.1+r253~ubuntu0.3.1, the bug persists.

Changed in switchboard-plug-keyboard:
status: Incomplete → Confirmed
Revision history for this message
Alexander Vasilyev (mizabrik) wrote :

>0.1.1+r253~ubuntu0.3.1

Oups... Updated manually to revision 254, though, no changes too.

Revision history for this message
Cody Garver (codygarver) wrote : Re: [Bug 1357895] Re: Keyboard layout switcher shortcuts not working

0.1.1+r254 is the update

On Sun, Nov 9, 2014 at 4:28 AM, Alexander Vasilyev <
<email address hidden>> wrote:

> Switchboard-plug-keyboard is updated to 0.1.1+r253~ubuntu0.3.1, the bug
> persists.
>
> ** Changed in: switchboard-plug-keyboard
> Status: Incomplete => Confirmed
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1357895
>
> Title:
> Keyboard layout switcher shortcuts not working
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/switchboard-plug-keyboard/+bug/1357895/+subscriptions
>

--
Cody Garver

Revision history for this message
Ash (ash1991) wrote : Re: Keyboard layout switcher shortcuts not working

still experiencing this bug with 0.1.1+r265.

Revision history for this message
Vladimir Pissarev (l-root-8) wrote :

+1

summary: - Keyboard layout switcher shortcuts not working
+ Keyboard layout switcher shortcuts not working [$25]
summary: - Keyboard layout switcher shortcuts not working [$25]
+ Keyboard layout switcher shortcuts not working [$40]
Revision history for this message
leanid chaika (leanid-chaika) wrote : Re: Keyboard layout switcher shortcuts not working [$40]

still not working!

Revision history for this message
Paul (chmykh-pv) wrote :

Beta 2 same problem. Can't use alt+shift or other combination to switch keyboard languages.

Paul (chmykh-pv)
summary: - Keyboard layout switcher shortcuts not working [$40]
+ Keyboard layout switcher shortcuts not working [$50]
Revision history for this message
parhom (andriy-parhomenko) wrote : Re: Keyboard layout switcher shortcuts not working [$50]

I'm having the same issue too.

Revision history for this message
Santiago (santileortiz) wrote :

Well this patch fixes this, I can't test shortcuts involving a right win key because I don't have one. The only ones that don't work for me still are both alt keys, and both ctrl keys, but I don't even know if they worked before. Currently the indicator on wing panel doesn't get updated, but I'm looking onto that, for now people can just activate a LED to know in which layout they are using.

Revision history for this message
Paul (chmykh-pv) wrote :

I think most important standart alt+shift configuration, which doesn't working.

Revision history for this message
Santiago (santileortiz) wrote :

Yes, I noticed that my patch didn't solve the issue by itself, I didn't remember but I had used sexkbmap and that helped fix the problem. The problem here is that the gnome-settings-daemon wants to handle all the layout configuration, but right now the way accelerators work require an alphanumeric character, and all of the shortcuts we are currently used to don't have a single alphanumeric character in them, just like you mention "Alt+shift", "both shifts", "supr" etc.

So on one side we can continue with what Gnome is trying to do which will imply (at least in the short term) we should change the shortcuts we are used to for others based on accelerators, and its uncertain how long it would take to get a more advanced UI for creating accelerators which is a lot of work on design and also programming. Also, this would require much more work for a lot of more exotic things that people could do using xkb, like controlling LEDS (not sure if Gnome has an interface for this), radio keys, and so on. The other thing that bothers me with this approach is that to my understanding accelerators currently work with keysyms (the symbol sent by a specific key), which would mean that people with for example Cyrillic keyboards could use a shortcut in one layout, but after they change, the keysym sent by that key would change too so that shortcut won't work anymore, maybe this is exactly why xkb's shortcuts didn't use alphanumeric characters in the first place. To have a more robust accelerator interface, we need to use keycodes and not keysyms, and this requires a lot of changes too.

On the other hand we can just patch gnome-settings-daemon to keep doing what we were doing before, but this will certainly make difficult future merges from upstream, because they are trying to do just the contrary of what we would do. It also will do things that Gnome is unaware of, and for example as I said before the indicator on wingpanel won't get updated.

In any case it's a trade-off and I we need to decide something here. I don't know how Gnome or Ubuntu are solving these kind of problems in their current versions, if someone could check that and see if it has gotten any better (and they already solved most of what I pointed before), then we might just port back changes from more current versions.

In the meantime people can try to use something like 'setxkbmap us,latam' (depending on which 2 layouts you use), and that should make it work, at least for now (maybe have this command called from a .desktop file so it is done at start up), just note that this is not what Gnome is expecting, but it shouldn't cause much trouble.

Revision history for this message
Or Schiro (orschiro) wrote :

I am also affected on Freya Beta 2 with the latest updates installed.

Tried different key(s) to change layout, such as pressing both Alt keys together. None of them work to switch between my German and my English keyboard layout.

summary: - Keyboard layout switcher shortcuts not working [$50]
+ Keyboard layout switcher shortcuts not working [$60]
summary: - Keyboard layout switcher shortcuts not working [$60]
+ Keyboard layout switcher shortcuts not working [$100]
Revision history for this message
Santiago (santileortiz) wrote :

Well so I decided to implement a new shortcut for this on the keyboard-plug for switchboard, an added functionality to Gala so that it changes the keyboard layout using GSettings instead of xkb. Once you install them you could change the accelerator for this on Settings>Keuboard>Shortcuts>Universal Access, in the end you will find two new shortcuts to change to the next and to the previous layout. By default it's set to Supr+o and Supr+e, but they can be changed. Sadly as I said before accelerators without an alphanumeric key won't work, shift+space does work, but Ctrl+space does not because it's reserved for ibus.

The branches with my work are these:

https://code.launchpad.net/~santileortiz/switchboard-plug-keyboard/switchboard-plug-keyboard
https://code.launchpad.net/~santileortiz/gala/gala

Id like to get feedback about this and propose them for merge.

Revision history for this message
Santiago (santileortiz) wrote :

The code for gala has been merged from here https://code.launchpad.net/~gala-dev/gala/keybinding-input-sources/+merge/252973 so people should be able to use <Shift>space to switch Layouts now.

Revision history for this message
Or Schiro (orschiro) wrote :

Dear Santiago,

Personally I don't like your proposed Shift + Space keybind. Now I frequently change the layout while writing without intending to.

How can I disable this keybind or change it to Shift + Ctrl + Space?

Thanks!

Robert

Revision history for this message
Santiago (santileortiz) wrote :

Yo can change it System Settings > Keyboard > Shortcuts > Universal Access as “Next Keyboard Layout”.

But specifically Shift + Ctrl + Space does not work because it displays a layout switcher that uses xkb, do you have any idea from where this may be comming?

Revision history for this message
Or Schiro (orschiro) wrote :

Thanks Santiago!

I changed it to Alt+Space. I couldn't find the setting in the first place because I was assuming to find it under Keyboard->Options->Key(s) to change layout.

> But specifically Shift + Ctrl + Space does not work because it displays a layout switcher that uses xkb, do you have any idea from where this may be comming?

Unfortunately not, sorry.

Furthermore I noticed that I cannot use Ctrl+Space. This keyboard shortcut shows me another (completely different?) method to switch layouts. Is this one also provided by eOS?

Please see my attached screenshot.

Robert

Revision history for this message
Santiago (santileortiz) wrote :

Yes I think that switcher is coming from ibus, and I am trying to find how to disable it because it may mess up the configuration of the keyboard.

Cody Garver (codygarver)
Changed in switchboard-plug-keyboard:
assignee: nobody → Cameron Norman (cameronnemo)
importance: Undecided → Low
milestone: none → freya-rc1
status: Confirmed → In Progress
assignee: Cameron Norman (cameronnemo) → Santiago (santileortiz)
Changed in gala:
assignee: nobody → Santiago (santileortiz)
importance: Undecided → Medium
milestone: none → freya-rc1
status: New → Fix Committed
Changed in switchboard-plug-keyboard:
milestone: freya-rc1 → none
Cody Garver (codygarver)
Changed in switchboard-plug-keyboard:
milestone: none → freya-rc1
status: In Progress → Fix Committed
Revision history for this message
Sergey Zolotarev (szx) wrote :

Is this fixed in elementary OS daily PPA?

Revision history for this message
Or Schiro (orschiro) wrote : Re: [Bug 1357895] Re: Keyboard layout switcher shortcuts not working [$100]

Hi Sergey,

For me it was, at least.

Robert
On Apr 3, 2015 4:45 AM, "Sergey Zolotarev" <email address hidden>
wrote:

> Is this fixed in elementary OS daily PPA?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1357895
>
> Title:
> Keyboard layout switcher shortcuts not working [$100]
>
> Status in Gala Window Manager:
> Fix Committed
> Status in Switchboard Keyboard Plug:
> Fix Committed
>
> Bug description:
> After a clean install of freya i added a new language and changed the
> Key(s) to change layout to Alt+Shift and Left Alt + Left Shift.
> None of these combination works and the keyboard layout stays the same.
> The only way i can switch the layout is by using the mouse.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/gala/+bug/1357895/+subscriptions
>

Cody Garver (codygarver)
Changed in switchboard-plug-keyboard:
milestone: freya-rc1 → freya-beta2
status: Fix Committed → Fix Released
Revision history for this message
Maxim Taranov (png2378-old-deactivatedaccount) wrote :

In Switchboard still can not install "Next Keyboard Layout" or "Previous Keyboard Layout" on the combination Shift+Ctrl/Shift+Alt. If this is done in the way of dconf "org → pantheon → desktop → gala → keybindings", then there is a conflict with other shortcuts.

For example if you set the layout switching on Ctrl+Shift, then stop working Ctrl+ Shift+T in the browser or Ctrl+Shift+V in the Pantheon Terminal, etc.

Revision history for this message
Santiago (santileortiz) wrote :

So, at first I thought this wasn't possible because of the way gnome-settings-daemon handles shortcuts. Then I remembered that we are actually using Mutter's keybinding handling now, so I went to look at the code and see if it could be possible. If my understanding of the code is right, any keybinding that does not have a keysym (something that is not between <>) will be ignored and will actually do nothing, and that's the case for the examples you say.

I've been looking a lot onto this, but I can't seem to find any implementation of keybindings that doesn't require an alphanumeric character but it seems there isn't. The only place I know these were used was on xkb, and many people got used to them, but for now I don't see a way in which this could be done.

Now, did setting the next-input-source to '<Shift><Ctrl>' made unusable your browser's keybindings? because I tried and that didn't happen, also I think Mutter should just ignore it so nothing should change.

Revision history for this message
Pi Squared (pi-squared) wrote :

I tried switching it to '<Alt><Shift>', '<Shift><Alt>', '<Ctrl><Shift>', '<Shift><Ctrl>' in dconf, tried logging off and restarting after that as well - the keybindings don't bind.

Revision history for this message
Santiago (santileortiz) wrote :

Well that's the intended behavior, currently there is no way (that I know of), in which we can support keybindings without alphanumeric characters unless we override some Meta Plugin functionality and implement our own, and I am not sure about doing this, maybe this should be done upstream, but this seems to be useful just to some corner cases.

Revision history for this message
Paul (chmykh-pv) wrote :

Still does not working by the way! No alt+shift possibility to switch keyboard layouts. :(

Revision history for this message
Paul (chmykh-pv) wrote :

Why the status is 'fix released'? The bug is here.

Revision history for this message
levik (levik666) wrote :

it affect's me too, actually it's very annoying :(

Revision history for this message
Santiago (santileortiz) wrote :

how does it affect you specifically, have you tried using Alt+space? you can change it in Settings -> keyboard -> Shortcuts -> Universal Access, there is one for the next layout and another one for the previous layout.

Revision history for this message
Oded Arbel (oded-geek) wrote :

Santiago: I'm not sure about your definition of "just some corner cases" - keyboard layout switching using only shift keys has been the norm since forever, even on X, and dismissing basically all multi-lingual users as "just some corner cases" is not productive.

XKB handles the requirement of using only shift keys for layout changes, and if you intend to drop that, please provide an alternative that meets the requirements.

Personally I've been using ALT-SPACE as a layout shortcut on some operating systems (mainly as a workaround for missing patch for XKB bug #865) and it is painful.

Revision history for this message
Santiago (santileortiz) wrote :

Believe me, I understand. In fact I am a multilingual user myself and I was very used to that exact same keybinding of using both shifts together, I just used both pinkies all the time, I am just starting to get used to Alt+space. I tried to understand why gnome took the decision of overriding the xkb configuration, and the reason (as far as I could understand) is mostly that xkb is not the only input method out there (see pinyin on ibus for example), so to actually support an ever bigger multilingual user base they had to compromise some stuff.

I am very open to hearing ways in which this could be brought back but we can't implement stuff that will make harder for us to get better ibus support in the future, I couldn't come up with a better solution for this than the one I implemented.

Revision history for this message
Or (or-zarchi) wrote :

This is a critical bug for multilingual users.. I'm sadly forced to switch to another distribution until this is fixed

Changed in gala:
status: Fix Committed → Fix Released
Revision history for this message
Sergey Kislyakov (defman21) wrote :

The bug is closed but I still can't change the keybinding to my own (e.g. Alt+Shift) through System Settings, but I can do it with dconf-editor. Or it's actually closed and the fix will be in the next release of Gala?

Revision history for this message
laci357 (laci357) wrote :

Hey everyone,
I understand what it feels like if you cannot use Alt+Shift, since I am a multilingual user (use 3 languages), but getting used to Alt + space OR Shift + space (if you changed the default 'Alt + space' to 'Shift + space' at System settings > Keyboard > Shortcuts > Universal Access > Next Keyboard Layout ) is not a hard way to walk.

In my opinion the guys at Elementary OS have been doing a great job so far. Congrats guys!
God bless you all!

Revision history for this message
Iliyan Ivanov (ilian-iv) wrote :

My workaround for Alt+Shift:
$ gsettings set org.pantheon.desktop.gala.keybindings switch-input-source "['<Alt>Shift_L']"
---
Elementary OS rulzz :)

Revision history for this message
Santiago (santileortiz) wrote :

oh, that's a nice option for people that want that specific keybinding, I had no idea the parser understood Shift_L and Shift_R as non modifier keys.

The problem is this depends on the order, Alt+Shift works but Shift+Alt won't work. In any case, nice find, thanks.

Revision history for this message
Maxim Taranov (png2378-old-deactivatedaccount) wrote :

Santiago, I'm surprised that you're not aware of it.

There is another way to work as a Alt+Shift or Shift+Alt:

gsettings set org.pantheon.desktop.gala.keybindings switch-input-source "['<Alt>Shift_L', '<Alt>Shift_R', '<Shift>Alt_L', '<Shift>Alt_R']"

Revision history for this message
Konstantin Shavlov (k-shavlov) wrote :

Hi

I've installed Elementary OS 0.4. Tried adding Russian and setting hot keys for switching layouts. But it seems not to work at all. I used both System Settings applet and gconf-editor and there was no result. Adding a string gsettings set org.pantheon.desktop.gala.keybindings switch-input-source "['<Alt>Shift_L', '<Alt>Shift_R', '<Shift>Alt_L', '<Shift>Alt_R']" with this variant or any other keys to rc.local didn't help too.

Revision history for this message
Santiago (santileortiz) wrote :

Yes, currently layout switching on Loki is broken because some code got moved, I'm working on this.

Revision history for this message
Guilherme Baufaker Rêgo (gbre-111) wrote :

Ok, thanks for the update.

Em Sex, 4 de mar de 2016 16:56, Santiago <email address hidden> escreveu:

> Yes, currently layout switching on Loki is broken because some code got
> moved, I'm working on this.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1357895
>
> Title:
> Keyboard layout switcher shortcuts not working [$100]
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/gala/+bug/1357895/+subscriptions
>

Revision history for this message
Saleh (salehbozeed) wrote :

I'm facing the same problem as well on 0.3.2 Freya! really annoying

Revision history for this message
Santiago (santileortiz) wrote :

What do you mean you have the same problem? is alt+space not working for you?

Revision history for this message
Mohammad Alshehabi (moh-alshehabi) wrote :

no, not any more, thnx bro

On Mon, May 16, 2016 at 7:21 PM Santiago <email address hidden> wrote:

> What do you mean you have the same problem? is alt+space not working for
> you?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1357895
>
> Title:
> Keyboard layout switcher shortcuts not working [$100]
>
> Status in Gala:
> Fix Released
> Status in Switchboard Keyboard Plug:
> Fix Released
>
> Bug description:
> After a clean install of freya i added a new language and changed the
> Key(s) to change layout to Alt+Shift and Left Alt + Left Shift.
> None of these combination works and the keyboard layout stays the same.
> The only way i can switch the layout is by using the mouse.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/gala/+bug/1357895/+subscriptions
>

Revision history for this message
Tony (pxl.th) wrote :

Hi, suddenly stopped working keyboard layout switching on Elementary OS Loki. Tried to reset and reset with gsettings - no effect. Is there any way to fix this?

Revision history for this message
Santiago (santileortiz) wrote :

Sorry about that, we just updated Gala to handle modifier-only keybindings again, there will be an update to the keyboard plug to set them up again, if you want a quick solution now, you can use dconf-editor and go to org.gnome.desktop.input-sources and add the option you want to xkb-options, the available options can be seen with 'grep grp: /usr/share/X11/xkb/rules/evdev.lst' (not all of them have been implemented but the most common should work fine).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.