how to map particular keys
- From: manu aradhya <manu_aradhya yahoo co in>
- To: gtk-app-devel-list gnome org
- Subject: how to map particular keys
- Date: Wed, 10 Sep 2003 08:14:58 +0100 (BST)
thanx for your reply,here is one simple program, in
the called fuction how can i print the key which has
pressed.how to make use of struct GdkEventKey. may be
GdkEventKey.val is useful to me. how can i store the
key pressed value in this element.
#include <gtk/gtk.h>
#include <gdk/gdk.h>
gint call_appln (GtkWidget *window2,GdkEvent
*event,gpointer data1) {
printf (" ------- key pressed ---------\n");
}
main (int argc, char *argv []) {
GtkWidget *window;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_signal_connect(GTK_OBJECT(window),"key_press_event",GTK_SIGNAL_FUNC
(call_appln), NULL);
gtk_widget_show (window);
gtk_main ();
}
-thnx manu
________________________________________________________________________
Yahoo! India Matrimony: Find your partner online.
Go to http://yahoo.shaadi.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]