Problem with Key press event



Title: Problem with Key press event

Hello,

I'm trying to port my GTK 1.3.10 application in GTK 2.0.1 but I have some trouble with key press events.
In my application, I redirect some keys (Pressing 'A' has the same behaviour as pressing 'Enter')

To do that, here is the code I've written:

gboolean on_key_press_event (GtkWidget * w, GdkEventKey * event, gpointer data) {

        if (event->keyval == 97)
                event->keyval = 32;
        ...

        return FALSE;
}


In GTK 1.3.10 everything is OK, but in GTK 2.0.1, it doesn't work. Can anyone tell me why that function doesn't work any more or how to do the same thing un GTK-2.0.1 ??

I read in the 2-0 changes notes that there were some changes in key bindings. Is it why it doesn't work anymore ??

Thanks for answer

Isabelle



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]