I have a problem getting keypress and keyrelease events in gtk+ : how do I
switch off autorepeat ?
I am designing a game, and I want to know exactely when a key is pressed or
Thanks in advance
Use gdk_key_repeat_disable() - and gdk_key_repeat_restore() to turnQuote:> I have a problem getting keypress and keyrelease events in gtk+ : how do I
> switch off autorepeat ?
> I am designing a game, and I want to know exactely when a key is pressed or
static gint focus_change_event(GtkWidget *widget,GdkEventFocus *event)Quote:}
(in window-creating routine, or whatever)Quote:}
/* need to get focus change events so we can fix the auto-repeat
* when focus is changed, not just when we start/stop.
I'll leave it to you to figure out when closedown() is called. :-)
It may also be a good idea to automatically pause the game when focus
is lost, not to mention `unpressing' any this-key-is-pressed flags you
Oh, and I think strictly speaking I should be using
GTK_SIGNAL_FUNC(focus_change_event) up there, rather than
(GtkSignalFunc)focus_change_event (but both work). I must have made
the mistake of believing the GTK+ tutorial or something. :-)
-Rus.Quote:> Thanks in advance
> Amedeo Storni
Hi, I'd like to make a program which is abble to intercept keyboard and
mouse event... like I would install a hook on the keyboard under Windows...
but I don't know how to do :(
Could you help me?
9. gtk and keys