Index: gtk.c
===================================================================
RCS file: /cvs/gnome/gcalctool/gcalctool/gtk.c,v
retrieving revision 1.72
diff -u -p -r1.72 gtk.c
--- gtk.c	13 Mar 2003 21:16:51 -0000	1.72
+++ gtk.c	14 Mar 2003 07:04:50 -0000
@@ -1592,7 +1592,7 @@ menu_proc_cb(GtkMenuItem *mi, gpointer u
 
 /*ARGSUSED*/
 static void 
-menu_button_cb(GtkWidget *widget, GdkEventButton *event, gpointer data)
+menu_button_button_press_cb(GtkWidget *widget, GdkEventButton *event, gpointer data)
 {
     struct button *n;
     GtkWidget *menu;
@@ -1607,6 +1607,20 @@ menu_button_cb(GtkWidget *widget, GdkEve
                    event->button, event->time);
 }
 
+static gboolean
+menu_button_key_press_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
+{
+    struct button *n;
+    GtkWidget *menu;
+
+    if (event->keyval == GDK_space) {
+        n = (struct button *) g_object_get_data(G_OBJECT(widget), "button");
+        menu = create_menu(n->mtype, n);
+        gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL,
+                       event->keyval, event->time);
+    }
+    return FALSE;
+}
 
 static GtkWidget *
 make_menu_button(gchar *label_text, int n)
@@ -1624,7 +1638,9 @@ make_menu_button(gchar *label_text, int 
  
     gtk_widget_set_events(button, GDK_BUTTON_PRESS_MASK);
     g_signal_connect(G_OBJECT(button), "button-press-event",
-                     G_CALLBACK(menu_button_cb), (gpointer) n);
+                     G_CALLBACK(menu_button_button_press_cb), (gpointer) n);
+    g_signal_connect(G_OBJECT(button), "key-press-event",
+    		     G_CALLBACK(menu_button_key_press_cb), (gpointer) n);
  
     gtk_widget_show_all(button);
  
