Passing KeyEvents to a WindowGroup
| Mon, 2007-02-05 11:30 | |
|
Hi, In my application I'm passing key events to any application, which is currently on the top (has focus). Note, that my application is sitting in the background. It works in most cases (like navigating through the menu, calendar application etc.). However, nothing happenes if I'm trying to pass the key event to a SnakeEx game during play (navigation in SnakeEx menu works fine). I suppose it uses the direct screen access.. Do you know why doesn't the game respond to my key events? Here's a sample code for sending the key events: Code: TWsEvent event; event.SetType(EEventKey); event.SetTimeNow(); event.Key()->iModifiers = 0; event.Key()->iRepeats = 0; event.Key()->iScanCode = EStdKeyNull; event.Key()->iCode = EKeyUpArrow; RWsSession rws = CCoeEnv::Static()->WsSession(); TInt topWindowGroupId = rws.GetFocusWindowGroup(); rws.SendEventToWindowGroup( topWindowGroupId, event ); Note, that I've checked all window group names, and there's only one window group named SnakeEx (which I actually use to pass the events). Regards, Damian Confusion will be my epitaph.. |
|





