key press events & holding keys down



Hey guys -- thanks again for the help I received recently regarding
several noobie issues. I'm still working on my space combat game, and
came across this little problem:

I control the spacecraft with the arrow keys, which I do by grabbing the
GdkEventKey and then checking it against GDK_KEY_Left, GDK_KEY_Right,
and so forth. Strictly speaking what I am concerned with is whether or
not the key is held down, but this seems to work because the key event
gets repeated.

However, if one of the arrows is held down, and another arrow is
pressed, then it shuts off events for the first arrow. That's bad, of
course, because in my game the player may want to hold down two arrows
keys at once (e.g., UP for acceleration and LEFT to turn the
spacecraft). So...

* are there configuration settings I need to adjust to change how these
GdKEventKeys are generated?

or

* is there some totally different method of checking and handling key
depression state that I should be using?

-- 
frigidcode.com
indicium.us



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