Index: gtkmenu.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkmenu.c,v
retrieving revision 1.73
diff -u -p -r1.73 gtkmenu.c
--- gtkmenu.c   2001/09/22 14:55:02     1.73
+++ gtkmenu.c   2001/10/01 15:24:22
@@ -629,11 +629,13 @@ gtk_menu_popup (GtkMenu               *menu,
   gtk_widget_show (GTK_WIDGET (menu));
   gtk_widget_show (menu->toplevel);
 
-  if (current_event)
+  if (current_event && !parent_menu_shell)
     {
       /* Also, if we're popping up from a key event, select the first
        * item in the menu. Bad hack, but no better way to do it
        * in current menu framework.
+       *
+       * Do not go here if called from gtkmenuitem.c.
        */
       if (current_event->type == GDK_KEY_PRESS &&
           GTK_MENU_SHELL (menu)->children)
Index: gtkmenubar.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkmenubar.c,v
retrieving revision 1.36
diff -u -p -r1.36 gtkmenubar.c
--- gtkmenubar.c        2001/08/23 23:30:43     1.36
+++ gtkmenubar.c        2001/10/01 15:24:22
@@ -143,6 +143,42 @@ gtk_menu_bar_class_init (GtkMenuBarClass
                                GTK_TYPE_MENU_DIRECTION_TYPE,
                                GTK_MENU_DIR_CHILD);
   
+  gtk_binding_entry_add_signal (binding_set, GDK_Tab, 0,
+                                "move_current", 1,
+                               GTK_TYPE_MENU_DIRECTION_TYPE,
+                               GTK_MENU_DIR_NEXT);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Tab, 0,
+                                "move_current", 1,
+                               GTK_TYPE_MENU_DIRECTION_TYPE,
+                               GTK_MENU_DIR_NEXT);
+  gtk_binding_entry_add_signal (binding_set, GDK_ISO_Left_Tab, 0,
+                                "move_current", 1,
+                               GTK_TYPE_MENU_DIRECTION_TYPE,
+                               GTK_MENU_DIR_NEXT);
+
+  gtk_binding_entry_add_signal (binding_set, GDK_Tab, GDK_SHIFT_MASK,
+                                "move_current", 1,
+                               GTK_TYPE_MENU_DIRECTION_TYPE,
+                               GTK_MENU_DIR_PREV);
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Tab, GDK_SHIFT_MASK,
+                                "move_current", 1,
+                               GTK_TYPE_MENU_DIRECTION_TYPE,
+                               GTK_MENU_DIR_PREV);
+  gtk_binding_entry_add_signal (binding_set, GDK_ISO_Left_Tab, GDK_SHIFT_MASK,
+                                "move_current", 1,
+                               GTK_TYPE_MENU_DIRECTION_TYPE,
+                               GTK_MENU_DIR_PREV);
+
+  gtk_binding_entry_add_signal (binding_set, GDK_Return, 0,
+                               "move_current", 1,
+                               GTK_TYPE_MENU_DIRECTION_TYPE,
+                               GTK_MENU_DIR_CHILD);
+
+  gtk_binding_entry_add_signal (binding_set, GDK_KP_Enter, 0,
+                               "move_current", 1,
+                               GTK_TYPE_MENU_DIRECTION_TYPE,
+                               GTK_MENU_DIR_CHILD);
+
   gtk_settings_install_property (g_param_spec_string ("gtk-menu-bar-accel",
                                                       _("Menu bar accelerator"),
                                                       _("Keybinding to activate the menu bar"),
@@ -398,9 +434,7 @@ window_key_press_handler (GtkWidget   *w
 
           if (menushell->children)
             {
-              gtk_signal_emit_by_name (GTK_OBJECT (menushell->children->data),
-                                       "activate_item");
-              
+              gtk_menu_shell_select_item (menushell, menushell->children->data);
               retval = TRUE;
             }
         }
