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 688350 - Layout switch does not work smoothly
Layout switch does not work smoothly
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: keyboard
3.6.x
Other Linux
: Normal critical
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2012-11-14 21:16 UTC by Vasily Khoruzhick
Modified: 2013-04-17 11:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
keyboard: Trigger input source switching on key press for Caps Lock (2.50 KB, patch)
2012-11-15 10:17 UTC, Rui Matos
committed Details | Review

Description Vasily Khoruzhick 2012-11-14 21:16:36 UTC
When input sources switcher shortcut is set to "caps lock" via gnome-tweak-tool sometimes switch does not happen and caps lock works like caps lock (i.e. locks capitals mode). It's very annoying, and makes this all input sources stuff unusable. xorg.conf settings with keyboard plugin removed work much, much better.

It looks like keyboard plugin tries to hook caps presses, but sometimes it fails.
Comment 1 Vasily Khoruzhick 2012-11-14 21:27:18 UTC
Severity is critical because gnome-3.6 is not usable for international users. It's a _critical_ issue, and it annoys everyone who has multiple keyboard layouts. Please fix it ASAP otherwise some users will be lost for you.
Comment 2 Rui Matos 2012-11-15 10:17:03 UTC
Created attachment 229032 [details] [review]
keyboard: Trigger input source switching on key press for Caps Lock

We usually only trigger the switch on key release because we don't
want to prevent applications from getting e.g. Ctrl+Shift+E if the
shortcut is Ctrl+Shift.

But, for shortcuts including Caps Lock we can trigger the switch on
key press since applications don't usually include Caps Lock in their
own shortcuts and this allows us to:

1) be more resposive;

2) trigger the switch even if the user is typing quickly and thus we
   are getting other key events;

3) reduce the time window during which the lock mask is active in the
   server.

--

Does this patch make it work better for you?

(In reply to comment #1)
> Severity is critical because gnome-3.6 is not usable for international users.
> It's a _critical_ issue, and it annoys everyone who has multiple keyboard
> layouts. Please fix it ASAP otherwise some users will be lost for you.

Can you please leave the drama and this kind of menacing out of
bugzilla? Thanks.
Comment 3 Bastien Nocera 2012-11-15 12:07:38 UTC
Review of attachment 229032 [details] [review]:

Code looks fine. Do you have something to guard against key repeats though? (not sure if CapsLock triggers repeats),
Comment 4 Vasily Khoruzhick 2012-11-15 12:33:04 UTC
(In reply to comment #2)

> Does this patch make it work better for you?

Yes, it does. Thank you very much!
 
> (In reply to comment #1)
> > Severity is critical because gnome-3.6 is not usable for international users.
> > It's a _critical_ issue, and it annoys everyone who has multiple keyboard
> > layouts. Please fix it ASAP otherwise some users will be lost for you.
> 
> Can you please leave the drama and this kind of menacing out of
> bugzilla? Thanks.

Ok, please don't treat my complains as menacing, I'm very sorry if it insults you.
Comment 5 Rui Matos 2012-11-15 12:50:03 UTC
(In reply to comment #3)
> Review of attachment 229032 [details] [review]:
> 
> Code looks fine. Do you have something to guard against key repeats though?
> (not sure if CapsLock triggers repeats),

None of CapsLock, Shift, Ctrl or Alt do key repeats.
Comment 6 Bastien Nocera 2012-11-15 12:57:37 UTC
Looks good then.
Comment 7 Rui Matos 2012-11-15 13:51:05 UTC
Attachment 229032 [details] pushed as ef29fcf - keyboard: Trigger input source switching on key press for Caps Lock
Comment 8 Vasily Khoruzhick 2012-11-16 11:49:15 UTC
It's better, but not perfect, layout switching still does not happen sometimes. For example in alt+f2 dialog. That's only an example, but not the only place where switch does not happen. However I can't find pattern :( Sometimes it happens in skype, sometimes in chromium. What's interesting - it happens more often if I type fast, if I type slowly it works. Maybe it does not switch if there's some other key is still pressed? Btw, if I type with pressed caps lock it acts as shift (i.e. produces capital letters), it should not happen, but it's another bug.
Comment 9 Rui Matos 2013-04-17 11:27:53 UTC
Let's keep this one closed. Further improvements can be tracked in bug 697002.