Re: Arrow keys move focus - how to disable?



"M Razhov" <mrazhov mail ru> writes:

Imagine one is writing a Tetris-like game where you control stuff
by the arrow keys.  So your main game display area is a GtkDrawable.
Now, under it, you have some buttons for special control, and a few
other widgets.  I connect to key_press_event of the drawable to
react to arrow presses.  Now, every time I press an arrow key, my
focus moves away from the Drawable!  How do I avoid this?


If you return TRUE from your drawing area's key press event handler,
it should keep the arrow keys from having a secondary effect.

Havoc




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