#include <gtk/gtk.h>

void
clicked (GtkButton *button, gpointer   user_data)
{
  g_message ("clicked");
}

gboolean key_cb (GObject *obj, GdkEventKey *key, gpointer data)
{
  g_message ("keyval = %d, hardcode = %d, group = %d ", key->keyval,
  key->hardware_keycode, key->group);
  return FALSE;
}


#include <gtk/gtk.h>

int main( int   argc,
          char *argv[] )
{
    GtkWidget *window;
    GtkWidget *button;
    
    gtk_init (&argc, &argv);
    
    window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    button = gtk_button_new_with_mnemonic ("_\u0424\u0430\u0439\u043b");
    gtk_container_add (GTK_CONTAINER(window), button);
    gtk_widget_show_all  (window);

    g_message("Keyval %d", 
	gtk_label_get_mnemonic_keyval(
	    GTK_LABEL(gtk_bin_get_child(GTK_BIN(button)))));    

    g_signal_connect (G_OBJECT(window), "key-press-event", G_CALLBACK(key_cb), NULL);
    g_signal_connect (G_OBJECT(button), "clicked", G_CALLBACK(clicked), NULL);
    g_signal_connect(G_OBJECT (window), "destroy", G_CALLBACK (gtk_main_quit), NULL);
    gtk_main ();

    return 0;
}
