我想用Symbian处理Green Key事件。我在KAknUidValueEndKeyCloseEvent的帮助下处理了Red Key(结束按钮)。你能告诉我Green Key事件的名称吗?这是必要的代码。
void CMobileDialerAppUi::HandleWsEventL(const TWsEvent &aEvent, CCoeControl *aDestination)
{
switch (aEvent.Type())
{
case KAknUidValueEndKeyCloseEvent:
{
TUid KMyAppUid = { 0x20070DF6 };
TApaTaskList tasklist(CCoeEnv::Static()->WsSession());
TApaTask task = tasklist.FindApp(KMyAppUid);
if(task.Exists())
{
task.BringToForeground();
}
symbian_ua_endcall();
break;
}
default:
CAknAppUi::HandleWsEventL(aEvent, aDestination);
break;
}
}
答案 0 :(得分:0)
在您的容器覆盖方法OfferKeyEventL
上TKeyResponse CMobileDialerContainer::OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType)
{
if (EStdKeyDevice0==aKeyEvent.iScanCode){
if (aType == EEventKeyUp) {
//a green key has press
return EKeyWasConsumed;
}
}
return EKeyWasConsumed;
}