I have the following code
And the ConstructL is as follows
TKeyResponse CAppInBackgroundContainer::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
if ( aKeyEvent.iCode== EKeyYes )
iLog.Write(_L("### OfferKeyEventL called ###")); //Log this call
It appears from the log that OfferKeyEventL() gets called immediately after ConstructL() and not when any key is pressed while the application is in the background.
void CAppInBackgroundContainer::ConstructL(const TRect& aRect)
iLog.Write(_L("### ConstructL(const TRect& aRect) = 1 ###"));
iEikonEnv->RootWin().CaptureKey( EKeyYes, 0, 0 );
iEikonEnv->RootWin().CaptureKeyUpAndDowns( EKeyYes, 0, 0 );
I tried replacing EkeyYes with EKeyDial and even that didnt work. Could you plz tell me what am I doing wrong ?
Thank you :-)