Redkey press not working on N97
hi
i have developed a application in Symbian.i want application should be exit on pressing redkey
for this i am using following code
TKeyResponse ClassName::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
{
if(aType == EEventKey)
{
switch(aKeyEvent.iScanCode)
{
case EStdKeyNo:
{
User::Exit(0);
return EKeyWasConsumed;
}
break;
}
}
return EKeyWasNotConsumed;
}
this code is work fine on Nokia E-71,5233,N79,N95
But it is not working for Nokia N-97
please help me ,how i can exit my application on redkey press on N97
Re: Redkey press not working on N97
Check if the code enters the following condition for N97:
switch(aKeyEvent.iScanCode)
{
case EStdKeyNo:
{
}
Re: Redkey press not working on N97
Exiting on the Red key is the default behaviour since S60 3rd edition. It is expected to happen without adding any code, you may want to try with a HelloWorld/freshly generated code.
Since the N97 has a foil-based "button", it may be worth testing if the "button" really works.
Side note: User::Exit is not a good way to exit an application, prefer the Exit function in the AppUi. From other classes (like CCoeControl-derived ones) you can still access it as CEikonEnv::Static()->AppUi()->Exit().