hi,
i want to handle keyevents while application running in background. but i am unable to do it.
i written this code
TKeyResponse CDemoUI1AppView::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
{
if ( aKeyEvent.iCode== '#' )
{
iEikonEnv->AlertWin (_L("keycaptured"));
return EKeyWasConsumed;
}
return EKeyWasNotConsumed;
}
and draw() method i added this code
CEikonEnv::Static()->RootWin().CaptureKey('#' , 0 , 0);
but nothing is happen. do i need to add any other code to this?
To make application to run in background i used
RWsSession aWsSession;
aWsSession.Connect();
TApaTask task(aWsSession);
task.SetWgId( CEikonEnv::Static()->RootWin().Identifier());
task.SendToBackground();
aWsSession.Close();
Application is going background but when i press # key no dialog box is coming.
pls help me.

Reply With Quote




