Index: gtk+/gtk/gtkwindow.c
===================================================================
RCS file: /export/cvs/gnome-2.0/gtk+/gtk/gtkwindow.c,v
retrieving revision 1.8
diff -p -u -5 -r1.8 gtkwindow.c
--- gtk+/gtk/gtkwindow.c	2002/05/03 21:23:55	1.8
+++ gtk+/gtk/gtkwindow.c	2002/05/07 09:36:07
@@ -235,10 +235,14 @@ static void     gtk_window_unrealize_ico
 
 static void        gtk_window_notify_keys_changed (GtkWindow   *window);
 static GtkKeyHash *gtk_window_get_key_hash        (GtkWindow   *window);
 static void        gtk_window_free_key_hash       (GtkWindow   *window);
 
+static gboolean    gtk_window_activate_key_without_modifiers (GtkWindow   *window,                                                               GdkEventKey *event);
+
+
+
 static GSList      *toplevel_list = NULL;
 static GHashTable  *mnemonic_hash_table = NULL;
 static GtkBinClass *parent_class = NULL;
 static guint        window_signals[LAST_SIGNAL] = { 0 };
 static GList       *default_icon_list = NULL;
@@ -3660,10 +3664,14 @@ gtk_window_key_press_event (GtkWidget   
 
       if (focus)
 	g_object_unref (focus);
     }
 
+  /* Check for mnemonics without modifiers */
+  if (!handled)
+    handled = gtk_window_activate_key_without_modifiers (window, event);
+
   /* Chain up, invokes binding set */
   if (!handled && GTK_WIDGET_CLASS (parent_class)->key_press_event)
     handled = GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, event);
 
   return handled;
@@ -6051,5 +6059,54 @@ _gtk_window_activate_key (GtkWindow   *w
 	return gtk_accel_groups_activate (G_OBJECT (window), found_entry->keyval, found_entry->modifiers);
     }
   else
     return FALSE;
 }
+
+static gboolean
+gtk_window_activate_key_without_modifiers (GtkWindow   *window,
+                                           GdkEventKey *event)
+{
+  GtkKeyHash *key_hash = g_object_get_data (G_OBJECT (window), "gtk-window-key-hash");
+  GtkWindowKeyEntry *found_entry = NULL;
+
+  if (!key_hash)
+    {
+      gtk_window_keys_changed (window);
+      key_hash = g_object_get_data (G_OBJECT (window), "gtk-window-key-hash");
+    }
+
+  if (key_hash)
+    {
+      GSList *entries = _gtk_key_hash_lookup (key_hash,
+                         event->hardware_keycode,
+                         GDK_MOD1_MASK,
+                         event->group);
+      GSList *tmp_list;
+
+      for (tmp_list = entries; tmp_list; tmp_list = tmp_list->next)
+         {
+           GtkWindowKeyEntry *entry = tmp_list->data;
+           if (entry->is_mnemonic)
+             {
+               found_entry = entry;
+               break;
+             }
+         }
+
+      if (!found_entry && entries)
+        found_entry = entries->data;
+
+      g_slist_free (entries);
+    }
+  if (found_entry)
+    {
+      if (found_entry->is_mnemonic && !event->state)
+        return gtk_window_mnemonic_activate (window, found_entry->keyval, found_entry->modifiers);
+
+      else
+        return FALSE;
+    }
+  else
+    return FALSE;
+}
+
