Symbian二版 获取当前输入法
请教高手,如何获取(二版)当前输入法在线等待中……
我模拟了一段三版的代码,
MAknEditingStateIndicator * ei = CAknEnv::Static()->EditingStateIndicator();
if(!ei)
return;
CAknIndicatorContainer *ic = ei->IndicatorContainer();
if(!ic)
return bRlt;
if (ic->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorPinyin)) || ic->IndicatorState(S_uid(156)))
{
//拼音
}
else if (ic->IndicatorState(S_uid(EAknNaviPaneEditorIndicatorStroke)) || ic->IndicatorState(S_uid(158)))
{
//笔画
}
……
在三版中的可以跑的,不过二版不支持……
特来请教高手!!! --------------------编程问答-------------------- 试试这个
TCoeInputCapabilities icap = static_cast<CCoeAppUi*>(CEikonEnv::Static()->AppUi())->InputCapabilities();
MCoeFepAwareTextEditor* fepAwareEditor = icap.FepAwareTextEditor();
if(NULL == fepAwareEditor)
return KErrNotFound;
MCoeFepAwareTextEditor_Extension1* extension1 = fepAwareEditor->Extension1();
if(NULL == extension1)
return KErrNotFound;
CAknEdwinState* edwinState = (CAknEdwinState*)(extension1->State(KNullUid));
TInt inputMode = edwinState->CurrentInputMode();
switch(inputMode)
{
case 1://text
{
TInt currCase = edwinState->CurrentCase();
if(currCase == EAknEditorLowerCase)//1
{
//IndicCatabc
}else if(currCase == EAknEditorUpperCase)//2
{
//IndicCatABC
}else if(currCase == EAknEditorTextCase)//4
{
//EIndicCatEnglish
}
}
break;
case 2:
//IndicCat123
break;
case 64:
//EIndicCatPinyin
break;
case 256:
//EIndicCatStroke
break;
default:
}
补充:移动开发 , Symbian