Questions on Key-Press Event



  Hello,

  I'm having some difficulty with key-press events,
and haven't been able to find answers in the mailing
list, docs, faqs, etc. I'd very much appreciate any
help.

  My main window has a menu-bar, tool-bar, and other
widget children. I'm trying to capture the events of
the keyboard's arrows being pressed (since the
application is a simple game). My main window
overrides
virtual bool
my_main_wnd::on_key_press_event(GdkEventKey *p_event).
This doesn't work (for me), due to two reasons:
A. When my main window overrides on_key_press_event, I
get notified of these events, but the keyboard has no
effect on the window's menu. When I erase the
override, however, the menu works fine with the
keyboard. Is there a way to both get the key-press
event and have the menu working properly?
B. In on_key_press_event, I switch(){} on
p_event->keyval. I'm checking for cases such as case
GDK_leftarrow:, but when I press the left key I get a
different value (65361), not the one I expect
(GDK_leftarrow). What should I write in the case _:,
therefore?

  Again, many thanks for you time. Additionally,
thanks to all those who contributed to this awesome
ass-kicking library!

  




		
__________________________________ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/



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