Odd, you seem to be getting 0 for both the Ctrl key and letter-C key. If the keyboard works and you can use it for other applications, then keypresscallback really should return non-zero character code values. I don't know pygtk, but if there are other keyboard input calls like sscanf in C, then experiment with these and see what you get. If you know C/C++ and GCC you could try the following to inspect the keyvals: // main.cpp #include <gtk/gtk.h> #include <gdk/gdkkeysyms.h> static gboolean keypresscallback ( GtkWidget * w, GdkEventKey *event, char * data ) { printf ( " key PRESS val=%x state=%x\n" , event->keyval , event->state ) ; return false; } int main ( int argc , char * argv[] ) { gtk_init(&argc, &argv); GtkWidget * window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER); gtk_window_set_default_size(GTK_WINDOW(window), 300 , 200); gtk_window_set_title(GTK_WINDOW(window), "Test Window"); gtk_widget_add_events (window, GDK_KEY_PRESS_MASK ); g_signal_connect ( window, "key-press-event", G_CALLBACK (keypresscallback), NULL ) ; gtk_widget_show_all(window); gtk_main(); } Also, could you use another standard western-european keyboard to see if it behaves differently? --- On Sun, 31/1/10, Yann Leboulanger <asterix@xxxxxxxxxxx> wrote:
|
Get your preferred Email name!
Now you can @ymail.com and @rocketmail.com.
_______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list