change the inputmode | developer.brewmp.com change the inputmode | developer.brewmp.com

Developer

change the inputmode

Forums:

i want to switch the input mode between LETTER and PINYIN by pressing key"#".
When this key was pressed down, the instruction "CD_InputModeSwitch(pApp)" would not execute. Could someone tell me why? Thanks!

if(pApp->m_eAppState == APP_STATE_EDIT)
{
if(eCode == EVT_KEY && wParam == AVK_POUND)
{
CD_InputModeSwitch(pApp);
}
return TRUE;
}

Hi,
Did u check if the control is getting hit inside this if loopif(pApp->m_eAppState == APP_STATE_EDIT).
If not app state-pApp->m_eAppState is not changed..
Else the key event is not coming into your handler..Might be handled by text controller and then consumed.

Hi,
Did u check if the control is getting hit inside this if loopif(pApp->m_eAppState == APP_STATE_EDIT).
If not app state-pApp->m_eAppState is not changed..
Else the key event is not coming into your handler..Might be handled by text controller and then consumed.

Hi,Osceans Eleven! i'm sure the control is getting hit inside the loop if(pApp->m_eAppState == APP_STATE_EDIT).I did as you suggested, still didn'k work.
if(pApp->m_eAppState == APP_STATE_EDIT)
{
if(eCode == EVT_KEY && wParam == AVK_POUND)
{
CD_InputModeSwitch(pApp);
return TRUE;
}
}
if (ITEXTCTL_HandleEvent(pApp->m_pText, eCode, wParam, dwParam))
{
........
}

Hi,Osceans Eleven! i'm sure the control is getting hit inside the loop if(pApp->m_eAppState == APP_STATE_EDIT).I did as you suggested, still didn'k work.
if(pApp->m_eAppState == APP_STATE_EDIT)
{
if(eCode == EVT_KEY && wParam == AVK_POUND)
{
CD_InputModeSwitch(pApp);
return TRUE;
}
}
if (ITEXTCTL_HandleEvent(pApp->m_pText, eCode, wParam, dwParam))
{
........
}

Are you sure the function CD_InputModeSwitch(pApp); does change the input mode to PINYIN?? Did you check if the input mode is set successfully??
Does your device pack support PINYIN text entry mode?? (check Device Details->TextEntry->Modes).. I believe the text entry will support those modes which are listed at TextEntry->Modes!!! Text input modes supported through the BREW text input control.
List all text input modes available in the BREW text input control.
I was using BREW 3.1.5 default device pack 4.. It supports English, Numeric, Symbols..
I used this code to test.case AVK_POUND:
{
AEETextInputMode inpMode=0;
AEETextInputModeInfo InpModeInfo={0};
inpMode=ITEXTCTL_GetInputMode(pMe->pMyTextCtl,&InpModeInfo);
DBGPRINTF("The inpMode is %d",inpMode);
DBGPRINTF("The inpModeInfo is %d and %S",InpModeInfo.tmMode,InpModeInfo.modeString);
inpMode=ITEXTCTL_SetInputMode(pMe->pMyTextCtl, AEE_TM_PINYIN);
inpMode=ITEXTCTL_GetInputMode(pMe->pMyTextCtl,&InpModeInfo);
DBGPRINTF("####aFTER CHANGING TO PINYIN");
DBGPRINTF("The inpMode is %d",inpMode);
DBGPRINTF("The inpModeInfo is %d and %S",InpModeInfo.tmMode,InpModeInfo.modeString);
if(inpMode != AEE_TM_PINYIN)// Check if ITEXTCTL_SetInputMode is SUCCESS
{
DBGPRINTF("####SetInputMode NOT success");
}
inpMode=ITEXTCTL_SetInputMode(pMe->pMyTextCtl, AEE_TM_NUMBERS);
inpMode=ITEXTCTL_GetInputMode(pMe->pMyTextCtl,&InpModeInfo);
DBGPRINTF("####aFTER CHANGING to NUMBERS");
DBGPRINTF("The inpMode is %d",inpMode);
DBGPRINTF("The inpModeInfo is %d and %S",InpModeInfo.tmMode,InpModeInfo.modeString);
if(inpMode != AEE_TM_NUMBERS)// Check if ITEXTCTL_SetInputMode is SUCCESS
{
DBGPRINTF("####SetInputMode NOT success");
}

break;
This was the output in logger..
*AEEShell.c:3607 - #*p:ECode:101, Key:e02c
*AEEShell.c:3607 - #*p:ECode:100, Key:e02c
*mybrewapp.c:245 - The inpMode is 3
*mybrewapp.c:246 - The inpModeInfo is 3 and multitap
*mybrewapp.c:250 - ####aFTER CHANGING TO PINYIN
*mybrewapp.c:251 - The inpMode is 3
*mybrewapp.c:252 - The inpModeInfo is 3 and multitap
*mybrewapp.c:255 - ####SetInputMode NOT success
*mybrewapp.c:260 - ####aFTER CHANGING to NUMBERS
*mybrewapp.c:261 - The inpMode is 5
*mybrewapp.c:262 - The inpModeInfo is 5 and Numbers
*AEEShell.c:3607 - #*p:ECode:102, Key:e02c

Are you sure the function CD_InputModeSwitch(pApp); does change the input mode to PINYIN?? Did you check if the input mode is set successfully??
Does your device pack support PINYIN text entry mode?? (check Device Details->TextEntry->Modes).. I believe the text entry will support those modes which are listed at TextEntry->Modes!!! Text input modes supported through the BREW text input control.
List all text input modes available in the BREW text input control.
I was using BREW 3.1.5 default device pack 4.. It supports English, Numeric, Symbols..
I used this code to test.case AVK_POUND:
{
AEETextInputMode inpMode=0;
AEETextInputModeInfo InpModeInfo={0};
inpMode=ITEXTCTL_GetInputMode(pMe->pMyTextCtl,&InpModeInfo);
DBGPRINTF("The inpMode is %d",inpMode);
DBGPRINTF("The inpModeInfo is %d and %S",InpModeInfo.tmMode,InpModeInfo.modeString);
inpMode=ITEXTCTL_SetInputMode(pMe->pMyTextCtl, AEE_TM_PINYIN);
inpMode=ITEXTCTL_GetInputMode(pMe->pMyTextCtl,&InpModeInfo);
DBGPRINTF("####aFTER CHANGING TO PINYIN");
DBGPRINTF("The inpMode is %d",inpMode);
DBGPRINTF("The inpModeInfo is %d and %S",InpModeInfo.tmMode,InpModeInfo.modeString);
if(inpMode != AEE_TM_PINYIN)// Check if ITEXTCTL_SetInputMode is SUCCESS
{
DBGPRINTF("####SetInputMode NOT success");
}
inpMode=ITEXTCTL_SetInputMode(pMe->pMyTextCtl, AEE_TM_NUMBERS);
inpMode=ITEXTCTL_GetInputMode(pMe->pMyTextCtl,&InpModeInfo);
DBGPRINTF("####aFTER CHANGING to NUMBERS");
DBGPRINTF("The inpMode is %d",inpMode);
DBGPRINTF("The inpModeInfo is %d and %S",InpModeInfo.tmMode,InpModeInfo.modeString);
if(inpMode != AEE_TM_NUMBERS)// Check if ITEXTCTL_SetInputMode is SUCCESS
{
DBGPRINTF("####SetInputMode NOT success");
}

break;
This was the output in logger..
*AEEShell.c:3607 - #*p:ECode:101, Key:e02c
*AEEShell.c:3607 - #*p:ECode:100, Key:e02c
*mybrewapp.c:245 - The inpMode is 3
*mybrewapp.c:246 - The inpModeInfo is 3 and multitap
*mybrewapp.c:250 - ####aFTER CHANGING TO PINYIN
*mybrewapp.c:251 - The inpMode is 3
*mybrewapp.c:252 - The inpModeInfo is 3 and multitap
*mybrewapp.c:255 - ####SetInputMode NOT success
*mybrewapp.c:260 - ####aFTER CHANGING to NUMBERS
*mybrewapp.c:261 - The inpMode is 5
*mybrewapp.c:262 - The inpModeInfo is 5 and Numbers
*AEEShell.c:3607 - #*p:ECode:102, Key:e02c

Osceans eleven, thanks a lot for the light you shed here. I'm using brew 3.1.5 and DevicePack 1, its TextEntry also supports letters, numeric, symbols, but doesn' t include PINYIN. So how i can solve this issuse? Very appreciated for ur help.

Osceans eleven, thanks a lot for the light you shed here. I'm using brew 3.1.5 and DevicePack 1, its TextEntry also supports letters, numeric, symbols, but doesn' t include PINYIN. So how i can solve this issuse? Very appreciated for ur help.

dengll wrote:Osceans eleven, thanks a lot for the light you shed here. I'm using brew 3.1.5 and DevicePack 1, its TextEntry also supports letters, numeric, symbols, but doesn' t include PINYIN. So how i can solve this issuse? Very appreciated for ur help.
Firstly, you need to download a device pack ,which supports Chinese text entry, from the Qualcomm BREW extranet..
Some other changes for language support is also needed (like fonts support etc etc).. Im not exactly sure what are those required stuffs!!! Contact Qualcomm support for more information...

dengll wrote:Osceans eleven, thanks a lot for the light you shed here. I'm using brew 3.1.5 and DevicePack 1, its TextEntry also supports letters, numeric, symbols, but doesn' t include PINYIN. So how i can solve this issuse? Very appreciated for ur help.
Firstly, you need to download a device pack ,which supports Chinese text entry, from the Qualcomm BREW extranet..
Some other changes for language support is also needed (like fonts support etc etc).. Im not exactly sure what are those required stuffs!!! Contact Qualcomm support for more information...