-
OfferKeyEventL
What is the way to handle the OfferKeyEventL() for several CEikEdwin's in the view?
Example:
========
//
// Example for single CEikEdwin
//
TKeyResponse CKgAppView2::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
{
return iEdit0->OfferKeyEventL(aKeyEvent, aType);
}
What would be the solution for several CEikEdwin's (eg. iEdit1, iEdit2, iEdit3, etc)? Where to look for sample code?
-
RE: OfferKeyEventL
You should check which field is focused
TKeyResponse CKgAppView2::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType)
{
TKeyResponse response = EKeyWasNotConsumed;
if (iEdit0->IsFocused())
response = iEdit0->OfferKeyEventL(aKeyEvent, aType);
else if (iEdit1->IsFocused())
response = iEdit1->OfferKeyEventL(aKeyEvent, aType);
//...etc.
return response;
}