Re: [PATCH] Re: Keyboard doesn't work under Gnome 2.6.
Sjoerd Simons <email@example.com> writes:
> On Sun, Apr 04, 2004 at 09:15:13PM +0200, Sjoerd Simons wrote:
> > On Sun, Apr 04, 2004 at 04:21:33PM +0200, Arnaud Patard (Rtp) wrote:
> > > There was two bugs with the multimedia keybindings. They are both
> > > fixed with the 184.108.40.206 version of control-center. The corresponding
> > > package will be uploaded today. Please, test it.
> > With 220.127.116.11 if i use a ``multimedia key'' it always tells me that that
> > key is already used for ``Launch Help Browser''. If i try to bind a
> > multimedia key to ``Launch Help Browser'' it tells me it's already in
> > use for ``Log Out''. Note that these are the first and second entry in
> > the list.
> Attached patch fixes this problem, so now my special keys work again :) .
> For more info see
> Getting there is only half as far as getting there and back.
> diff -Naur control-center-18.104.22.168.orig/capplets/keybindings/gnome-keybinding-properties.c control-center-22.214.171.124/capplets/keybindings/gnome-keybinding-properties.c
> --- control-center-126.96.36.199.orig/capplets/keybindings/gnome-keybinding-properties.c 2004-04-06 09:43:45.835945163 +0200
> +++ control-center-188.8.131.52/capplets/keybindings/gnome-keybinding-properties.c 2004-04-06 09:46:08.948082940 +0200
> @@ -673,8 +673,9 @@
> if (tmp_key_entry != NULL &&
> strcmp (key_entry->gconf_key, tmp_key_entry->gconf_key) != 0 &&
> - ((key_entry->keyval == tmp_key_entry->keyval &&
> - key_entry->mask == tmp_key_entry->mask) ||
> + ((key_entry->keyval == tmp_key_entry->keyval &&
> + key_entry->keycode == tmp_key_entry->keycode &&
> + key_entry->mask == tmp_key_entry->mask) ||
> key_entry->keycode == tmp_key_entry->keycode))
> /* be sure we don't claim a key is a dup of itself */
This looks wrong, you have key_entry->keycode compared twice. Perhaps it
should just be all three comparisons &&'d together.