Index: gtkkeyhash.c
===================================================================
--- gtkkeyhash.c	(revision 21770)
+++ gtkkeyhash.c	(working copy)
@@ -359,7 +359,14 @@
 	{
 	  GtkKeyHashEntry *entry = tmp_list->data;
 	  GdkModifierType xmods, vmods;
-	  
+	  gboolean zero_modifiers_mismatch = FALSE;
+
+	  /* if either the entry or the passed in state have no modifiers that the other must match that condition
+	   */
+	  if ((((entry->modifiers & ~consumed_modifiers & mask) == 0) && ((state & ~consumed_modifiers & mask) != 0)) || 
+	      (((entry->modifiers & ~consumed_modifiers & mask) != 0) && ((state & ~consumed_modifiers & mask) == 0)))
+   	    zero_modifiers_mismatch = TRUE;
+
 	  /* If the virtual super, hyper or meta modifiers are present, 
 	   * they will also be mapped to some of the mod2 - mod5 modifiers, 
 	   * so we compare them twice, ignoring either set.
@@ -367,8 +374,9 @@
 	  xmods = GDK_MOD2_MASK|GDK_MOD3_MASK|GDK_MOD4_MASK|GDK_MOD5_MASK;
 	  vmods = GDK_SUPER_MASK|GDK_HYPER_MASK|GDK_META_MASK;
 
-	  if ((entry->modifiers & ~consumed_modifiers & mask & ~vmods) == (state & ~consumed_modifiers & mask & ~vmods) ||
-	      (entry->modifiers & ~consumed_modifiers & mask & ~xmods) == (state & ~consumed_modifiers & mask & ~xmods))
+	  if (!zero_modifiers_mismatch &&
+	      ((entry->modifiers & ~consumed_modifiers & mask & ~vmods) == (state & ~consumed_modifiers & mask & ~vmods) ||
+	       (entry->modifiers & ~consumed_modifiers & mask & ~xmods) == (state & ~consumed_modifiers & mask & ~xmods)))
 	    {
 	      gint i;
 
@@ -377,7 +385,6 @@
 		  GTK_NOTE (KEYBINDINGS,
 			    g_message ("  found exact match, keyval = %u, modifiers = 0x%04x",
 				       entry->keyval, entry->modifiers));
-		  
 		  if (!have_exact)
 		    {
 		      g_slist_free (results);
@@ -403,7 +410,7 @@
 			}
 		    }
 		}
-	    }
+	    } 
 
 	  tmp_list = tmp_list->next;
 	}
