Bug 1150199

Summary: many kbd layouts not selectable
Product: [Fedora] Fedora Reporter: Stas Sergeev <stsp2>
Component: control-centerAssignee: Control Center Maintainer <control-center-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 20CC: control-center-maint, dchen, extras-qa, fmuellner, i18n-bugs, K9, kent.neo, mfabian, mkasik, ofourdan, petersen, pwu, rmatos, rstrode, shawn.p.huang, stsp2, tfujiwar, tiagomatos
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gnome-desktop3-3.10.2-3.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1133127 Environment:
Last Closed: 2014-10-27 03:26:55 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:

Description Stas Sergeev 2014-10-07 16:15:21 UTC
+++ This bug was initially created as a clone of Bug #1133127 +++

--- Additional comment from Mike FABIAN on 2014-10-07 02:08:46 EDT ---

(In reply to Mike FABIAN from comment #88)
> 
> “Russian (typewriter, legacy)” is selectable in gnome-control-center
> in f21 (I guess in f19 as well, I’ll check in a minute ...)

No, it is not listed by gnome-control-center in f19 and f20.

--- Additional comment from Mike FABIAN on 2014-10-07 05:32:53 EDT ---

(In reply to Mike FABIAN from comment #92)
> (In reply to Stas Sergeev from comment #91)
> > (In reply to Mike FABIAN from comment #90)
> > > Try it and type something, it is different from the layout of your rusle
> > > table,
> > > so I am not sure that this is the layout you want.
> > I'll try that ASAP.
> > In a mean time maybe you can fill in a bug-report about
> > why it is not showing in g-c-c. :)
> 
> Well, it happens to show in g-c-c in Fedora 21 Beta.
> But I guess that showing it is an accident. g-c-c tries
> to show only layouts which are commonly used, as far as I know.
> There are very many obscure xkb layouts which probably (almost)
> nobody uses, g-c-c apparently wants to keep the list shown short
> by showing only common ones.

Looks like I was mistaken here and not showing these layouts was a bug
in Gnome in f19 and f20, Takao Fujiwara tells me it was a bug which
has apparently been fixed in f21.

--- Additional comment from Stas Sergeev on 2014-10-07 05:42:04 EDT ---

(In reply to Mike FABIAN from comment #94)
> Looks like I was mistaken here and not showing these layouts was a bug
> in Gnome in f19 and f20, Takao Fujiwara tells me it was a bug which
> has apparently been fixed in f21.
But F21 is not yet released.
How about a fix for 19/20?

Comment 1 Fedora Update System 2014-10-21 13:56:24 UTC
gnome-desktop3-3.10.2-3.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/gnome-desktop3-3.10.2-3.fc20

Comment 2 Mike FABIAN 2014-10-21 16:02:32 UTC
(In reply to Fedora Update System from comment #1)
> gnome-desktop3-3.10.2-3.fc20 has been submitted as an update for Fedora 20.
> https://admin.fedoraproject.org/updates/gnome-desktop3-3.10.2-3.fc20

That works, the Russian legacy keyboard layout is listed in 
“gnome-control-center region” now.

Comment 3 Stas Sergeev 2014-10-22 19:34:31 UTC
I've found something strange.
In xawtv some hotkeys are defined, for example,
'a' toggles mute status.
If I use EN, that works.
If I use Р (aka rusle) - it still works, although 'a'
should became 'ф'.
If I use RU (aka XKB Russian legacy) - hotkey does not work.

Notably, I am not sure what is the correct behaviour.
Maybe the latinic hot key should not work in cyrillic mode?
But in any case, the difference between rusle and XKB
is very suspicious.

Comment 4 Jens Petersen 2014-10-23 01:39:55 UTC
(In reply to Stas Sergeev from comment #3)
> If I use Р (aka rusle) - it still works, although 'a'
> should became 'ф'.
> If I use RU (aka XKB Russian legacy) - hotkey does not work.

This sounds like an ibus issue perhaps?

Probably better to report it separately.

Comment 5 fujiwara 2014-10-23 02:01:49 UTC
(In reply to Jens Petersen from comment #4)
> (In reply to Stas Sergeev from comment #3)
> > If I use Р (aka rusle) - it still works, although 'a'
> > should became 'ф'.
> > If I use RU (aka XKB Russian legacy) - hotkey does not work.
> 
> This sounds like an ibus issue perhaps?
> 
> Probably better to report it separately.

Because 'a' does not exist in Russian keyboard. The shortcut key would be wrong.

Comment 6 Mike FABIAN 2014-10-23 03:59:17 UTC
(In reply to Stas Sergeev from comment #3)
> I've found something strange.
> In xawtv some hotkeys are defined, for example,
> 'a' toggles mute status.
> If I use EN, that works.
> If I use Р (aka rusle) - it still works, although 'a'
> should became 'ф'.
> If I use RU (aka XKB Russian legacy) - hotkey does not work.
> 
> Notably, I am not sure what is the correct behaviour.
> Maybe the latinic hot key should not work in cyrillic mode?
> But in any case, the difference between rusle and XKB
> is very suspicious.

No, that’s normal.

xawtv is neither a GTK nor a Qt program, but a plain X11 program.

X11 programs can use input methods like ibus only via XIM.

To use XIM, an X11 program has to call XSetLocaleModifiers("")
somewhere.

xawtv does not do that (Why should it? There is nothing to input 
in xawtv)

So if you try to use the rusle table with xawtv (or *any* other
ibus input method for that matter ...), the input method is
not switched on and xawtv just gets the key event.

When using the rusle table with ibus, that means you get the
key events of the keyboard layout used with rusle, which is
forced to be the us keyboard layout in case of rusle. Because of

    ### The Keyboard Layout used by this table.
    ### Set to "default" to accept any kind of layout
    KEYBOARD_LAYOUT = us

in the source of the rusle table.

So xawtv just gets the 'a' if you press the 'a' key
and for xawtv, 'a' means mute/unmute.

But if you use the Russian legacy XKB keyboard layout, that
key already gives a 'ф' which is ignored by xawtv.

You can see exactly the same with other X11 applications which do not
call XSetLocaleModifiers("").

Try it with 'xev', that shows you clearly that you get an 'a', not a 'ф'
in 'xev' no matter whether ibus-table with rusle is turned on or off.
Note that you cannot switch between direct input and table mode
(☐Р/☑Р) using the hotkey (Left Shift) either while 'xev', 'xawtv' (or
other X11 programs not supporting XIM) have focus. Because that hotkey
would be handled by ibus-table, i.e. the input method, but that
is not switched on in 'xev' and 'xawtv'.

Comment 7 Stas Sergeev 2014-10-23 19:11:33 UTC
Thanks, pretty clear.

(In reply to Mike FABIAN from comment #6)
> Note that you cannot switch between direct input and table mode
> (☐Р/☑Р) using the hotkey (Left Shift) either while 'xev', 'xawtv' (or
Indeed, and, quite spectacularly, it stays checked,
while it would be more appropriate to stay unchecked
in this case (I realize it is probably not possible
to change this).

Comment 8 Stas Sergeev 2014-10-23 19:37:35 UTC
There is something else is wrong too.
After I added both rusle and XKB ru, some
sequence of events (that involves switching and
typing) causes the firefox menus to stop working.
They appear just for a short moment and immediately
disappear, as if some key like ESC is being constantly
pressed.
I don't know how to reliably reproduce that yet,
but it happened many times, and the only cure
I've found is to close firefox.
Very annoying...

The effect is very similar to this:
https://bugs.launchpad.net/libdbusmenu-qt/+bug/1035755
but the conditions look entirely different.
Still they say there is something with event
timestamps, and I wonder if this can ring any bells...

Comment 9 Fedora Update System 2014-10-27 03:26:55 UTC
gnome-desktop3-3.10.2-3.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.