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 170318 - keyboard does not work when remotely logged on machine with different keyboard type
keyboard does not work when remotely logged on machine with different keyboar...
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: [obsolete] settings-daemon
git master
Other All
: Normal blocker
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-03-14 13:15 UTC by Erwann Chenede
Modified: 2006-08-24 14:45 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
patch in cvs diff -u format (866 bytes, patch)
2006-04-05 13:36 UTC, Erwann Chenede
committed Details | Review

Description Erwann Chenede 2005-03-14 13:15:44 UTC
Please describe the problem:
remote logging in a gnome session via gdm xdmcp chooser with a different 
keyboard type where a multimedia key is set to a keyboard specific key 
(e.g. "Help" button or "SunAudioMute"). 
This results in a XKeyGrab to "AnyKey". 

This means the keyboard can not be used. As this happen in gnome-settings-daemon
this effectively blocks the session.

Steps to reproduce:
Here is a simple way to reproduce without remotely login :

1. assign gconf key in /apps/gnome_settings_daemon/keybindings/volume_mute
 to "Help". (at this point your keyboard should be already grabbed)

2. logout and log back into a Gnome session



Actual results:
the keyboard doesn't work anymore as an AnyKey grab is performed in
gnome-control-center/gnome-settings-daemon/gnome-settings-multimedia-keys.c

Expected results:
a warning should be produced and the keybinding should be ignored if the keycode 
returned from the egg_accelerator_parse_virtual in init_kbd in
gnome-control-center/gnome-settings-daemon/gnome-settings-multimedia-keys.c 
is equal to zero (which means AnyKey for the subsequent keygrab).

Does this happen every time?
yes.

Other information:
Here is a small patch which fixes the problem :

Index: gnome-settings-daemon/gnome-settings-multimedia-keys.c
===================================================================
RCS file:
/cvs/gnome/gnome-control-center/gnome-settings-daemon/gnome-settings-multimedia-keys.c,v
retrieving revision 1.12
diff -r1.12 gnome-settings-multimedia-keys.c
451a452,460
>       /*avoid grabbing all the keyboard when KeyCode cannot be retrieved */
>               if (key->keycode == AnyKey)
>                 {
>                   g_warning ("The shortcut key \"%s\" cannot be found on the
current system, ignoring the binding", tmp);
>                   g_free (tmp);
>                   g_free (key);
>                   continue;
>                 }
>
Comment 1 Rodrigo Moya 2006-01-03 09:33:52 UTC
svu, any comment on this?
Comment 2 Rodrigo Moya 2006-04-05 13:15:59 UTC
Erwann, could you please attach the patch in unified form (cvs diff -u) please?

If nobody comments anything, I'll commit it to CVS.
Comment 3 Erwann Chenede 2006-04-05 13:36:14 UTC
Created attachment 62791 [details] [review]
patch in cvs diff -u format

attaching the patch in unified format as requested by Rodrigo
Comment 4 Sergey V. Udaltsov 2006-07-08 22:28:44 UTC
Rodrigo, this is not exactly my department - but the patch looks ok to me.
Comment 5 André Klapper 2006-08-24 14:35:43 UTC
*poke*
rodrigo, can this *please* be committed asap then?
Comment 6 Rodrigo Moya 2006-08-24 14:45:02 UTC
Patch committed to CVS, thanks