/* atk_add_key_event_listener */

#include <gtk/gtk.h>

static gboolean
atk_key_listener (AtkKeyEventStruct *event, gpointer data)
{
  g_print ("atk_listener: 0x%x \n", event->keyval);

  return FALSE;
}

int
main (int argc, char **argv)
{
  GtkWidget *window;

  gtk_init (&argc, &argv);
  atk_add_key_event_listener ((AtkKeySnoopFunc)atk_key_listener, NULL);

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  g_signal_connect (window, "delete-event", G_CALLBACK (gtk_main_quit), 0);

  gtk_widget_show_all (window);
  gtk_main ();

  return 0;
}
