fep/aknfep/src/AknFepPluginManager.cpp
branchRCL_3
changeset 12 4eb1ae11334f
parent 10 6defe5d1bd39
child 14 e6a39382bb9c
equal deleted inserted replaced
10:6defe5d1bd39 12:4eb1ae11334f
    57 #include <peninputcommonlayoutglobalenum.h>
    57 #include <peninputcommonlayoutglobalenum.h>
    58 #include <PtiCompositionDataIF.h> // MPtiEngineCompositionDataInterface
    58 #include <PtiCompositionDataIF.h> // MPtiEngineCompositionDataInterface
    59 #include <eikapp.h>
    59 #include <eikapp.h>
    60 #include <AknFepGlobalEnums.h>
    60 #include <AknFepGlobalEnums.h>
    61 #include <AknFepInternalCRKeys.h>
    61 #include <AknFepInternalCRKeys.h>
       
    62 #include <AknFepInternalPSKeys.h>
    62 
    63 
    63 // User includes
    64 // User includes
    64 #include "AknFepManagerInterface.h" // MAknFepManagerInterface
    65 #include "AknFepManagerInterface.h" // MAknFepManagerInterface
    65 #include "AknFepUiManagerBase.h"
    66 #include "AknFepUiManagerBase.h"
    66 #include "aknfepuimanagerfingeritutchinese.h"
    67 #include "aknfepuimanagerfingeritutchinese.h"
   244                                           CAknFepSharedDataInterface& aSharedData,
   245                                           CAknFepSharedDataInterface& aSharedData,
   245                                           CAknFepLanguageManager& aLangMan,
   246                                           CAknFepLanguageManager& aLangMan,
   246                                           CAknFepCaseManager& aCaseMan )
   247                                           CAknFepCaseManager& aCaseMan )
   247     : iFepMan( aFepMan ), iLangMan( aLangMan ), iCaseMan( aCaseMan ),
   248     : iFepMan( aFepMan ), iLangMan( aLangMan ), iCaseMan( aCaseMan ),
   248       iSharedData( aSharedData ), iPluginPrimaryRange( ERangeInvalid ), iCandidateIndex(1),
   249       iSharedData( aSharedData ), iPluginPrimaryRange( ERangeInvalid ), iCandidateIndex(1),
   249       iCharStartPostion( KInvalidValue )
   250       iCharStartPostion( KInvalidValue ),
       
   251 	  iInSpellMode( EFalse )
   250     {
   252     {
   251     iIndicatorImgID = 0;
   253     iIndicatorImgID = 0;
   252     iIndicatorTextID = 0;
   254     iIndicatorTextID = 0;
   253     iLastDataQueryWin = NULL;
   255     iLastDataQueryWin = NULL;
   254     iDefaultOrientation = -1;
   256     iDefaultOrientation = -1;
   275     iHasSWEventCap = client.HasCapability(ECapabilitySwEvent);
   277     iHasSWEventCap = client.HasCapability(ECapabilitySwEvent);
   276     client.Close();
   278     client.Close();
   277     iAvkonRepository = CRepository::NewL( KCRUidAvkon ); 
   279     iAvkonRepository = CRepository::NewL( KCRUidAvkon ); 
   278     
   280     
   279     iConnectAo = new (ELeave)CConnectAo(this);
   281     iConnectAo = new (ELeave)CConnectAo(this);
       
   282     
       
   283     RProperty::Define( KPSUidAknFep, KAknFepSettingDialogState, RProperty::EInt );
   280     }
   284     }
   281 
   285 
   282 // -----------------------------------------------------------------------------
   286 // -----------------------------------------------------------------------------
   283 // CAknFepPluginManager::ActivatePenInputL
   287 // CAknFepPluginManager::ActivatePenInputL
   284 // Change to default plugin input mode
   288 // Change to default plugin input mode
  1032     if (!GetCurSuggestMode( aSuggestMode ))
  1036     if (!GetCurSuggestMode( aSuggestMode ))
  1033         {
  1037         {
  1034         return EFalse;    
  1038         return EFalse;    
  1035         }
  1039         }
  1036     
  1040     
  1037     // add by jiawenjuan to remember the old fep aware editor.
  1041     // remember the old fep aware editor.
  1038     TBool cleanContent = EFalse;   
  1042     TBool cleanContent = EFalse;   
  1039     if(iOldFepAwareEditor != iFepMan.FepAwareTextEditor())
  1043     if(iOldFepAwareEditor != iFepMan.FepAwareTextEditor())
  1040         {
  1044         {
  1041         cleanContent = ETrue;
  1045         cleanContent = ETrue;
  1042         iOldFepAwareEditor = iFepMan.FepAwareTextEditor();
  1046         iOldFepAwareEditor = iFepMan.FepAwareTextEditor();
  1051     // it means that predictive setting dialog is closed, then re-open FSQ again.
  1055     // it means that predictive setting dialog is closed, then re-open FSQ again.
  1052     // Need to set iITISettingDialogOpen = EFalse at this moment
  1056     // Need to set iITISettingDialogOpen = EFalse at this moment
  1053     if ( iITISettingDialogOpen )
  1057     if ( iITISettingDialogOpen )
  1054     	{
  1058     	{
  1055     	iITISettingDialogOpen = EFalse;
  1059     	iITISettingDialogOpen = EFalse;
  1056     	}  
  1060     	}
       
  1061 
       
  1062     // Set the KAknFepTouchInputActive PS to 1, 
       
  1063     // it means that touch input is active now.
       
  1064     RProperty::Set( KPSUidAknFep, KAknFepTouchInputActive, 1 );
  1057     
  1065     
  1058     // getting a new ui manager object corresponded in aMode.
  1066     // getting a new ui manager object corresponded in aMode.
  1059     TInt uiLanguage = iSharedData.DisplayLanguage();
  1067     TInt uiLanguage = iSharedData.DisplayLanguage();
  1060     if( uiLanguage == ELangTest )
  1068     if( uiLanguage == ELangTest )
  1061         {
  1069         {
  1155         isSplit = EFalse;
  1163         isSplit = EFalse;
  1156         }    
  1164         }    
  1157     iLangMan.SetSplitView(isSplit);
  1165     iLangMan.SetSplitView(isSplit);
  1158  
  1166  
  1159     TInt inputLang = iFepMan.InputLanguageCapabilities().iInputLanguageCode;
  1167     TInt inputLang = iFepMan.InputLanguageCapabilities().iInputLanguageCode;
       
  1168     if( ( aSuggestMode == EPluginInputModeFSc || 
       
  1169             aSuggestMode == EPluginInputModeHwr ||
       
  1170             aSuggestMode == EPluginInputModeFingerHwr )
       
  1171             && ( iSharedData.PenInputLanguage() == ELangPrcChinese 
       
  1172                 || iSharedData.PenInputLanguage() == ELangHongKongChinese
       
  1173                 || iSharedData.PenInputLanguage() == ELangTaiwanChinese) )
       
  1174         {
       
  1175         // Solution for HWR can not be in used after switched to latin-only editor.
       
  1176         inputLang = iSharedData.PenInputLanguage();
       
  1177         }
  1160     MAknFepManagerInterface* fepUI = iLangMan.GetPluginInputFepUiL(
  1178     MAknFepManagerInterface* fepUI = iLangMan.GetPluginInputFepUiL(
  1161                                                     aSuggestMode, 
  1179                                                     aSuggestMode, 
  1162                                                     inputLang,
  1180                                                     inputLang,
  1163                                                     uiLanguage,
  1181                                                     uiLanguage,
  1164                                                     &iPenInputServer); 
  1182                                                     &iPenInputServer); 
  1361         
  1379         
  1362     // Notify editor the touch window has been closed
  1380     // Notify editor the touch window has been closed
  1363     NotifyAppUiImeTouchWndStateL( EFalse );
  1381     NotifyAppUiImeTouchWndStateL( EFalse );
  1364     
  1382     
  1365     iCharStartPostion = KInvalidValue;
  1383     iCharStartPostion = KInvalidValue;
       
  1384     
       
  1385     // Set the KAknFepTouchInputActive PS to 0, 
       
  1386     // it means that touch input is inactive now.
       
  1387     RProperty::Set( KPSUidAknFep, KAknFepTouchInputActive, 0 );
  1366     }
  1388     }
  1367 
  1389 
  1368 // ---------------------------------------------------------------------------
  1390 // ---------------------------------------------------------------------------
  1369 // CAknFepPluginManager::OnResourceChangedL
  1391 // CAknFepPluginManager::OnResourceChangedL
  1370 // (other items were commented in a header)
  1392 // (other items were commented in a header)
  1569                     iFepMan.HandleCopyCutEventL(EEikCmdEditCopy);
  1591                     iFepMan.HandleCopyCutEventL(EEikCmdEditCopy);
  1570                     }   // Send copy-event to edwin.
  1592                     }   // Send copy-event to edwin.
  1571                     break;
  1593                     break;
  1572                 case EEikCmdEditPaste:
  1594                 case EEikCmdEditPaste:
  1573                     {//ctrl + v
  1595                     {//ctrl + v
       
  1596                     ResetMenuState();    
  1574                     TKeyEvent ccpuKey = KAknCcpuPasteEvent;
  1597                     TKeyEvent ccpuKey = KAknCcpuPasteEvent;
  1575                     CCoeEnv::Static()->SimulateKeyEventL( ccpuKey, EEventKey );
  1598                     CCoeEnv::Static()->SimulateKeyEventL( ccpuKey, EEventKey );
  1576                     }   // Send copy-event to edwin.
  1599                     }   // Send copy-event to edwin.
  1577                     break;
  1600                     break;
  1578                 }
  1601                 }
  2066             return;
  2089             return;
  2067             }
  2090             }
  2068 
  2091 
  2069         if( iInMenu && iCurEditor == iFepMan.FepAwareTextEditor() )
  2092         if( iInMenu && iCurEditor == iFepMan.FepAwareTextEditor() )
  2070             {
  2093             {
  2071             ResetMenuState();
  2094             ResetMenuState();            
  2072             InformMfneUiStatusL( EFalse );
       
  2073 			// If need to open setting app automatically, 
  2095 			// If need to open setting app automatically, 
  2074 			// do not open Touch window again. 
  2096 			// do not open Touch window again. 
  2075 			TBool langChange = iCurLanguage != iSharedData.InputTextLanguage();
  2097 			TBool langChange = iCurLanguage != iSharedData.InputTextLanguage();
  2076 					
  2098 					
  2077 			TryChangePluginInputModeByModeL(
  2099 			TryChangePluginInputModeByModeL(
  2338     // get current editor content	
  2360     // get current editor content	
  2339     HBufC* currentEditorContentBuf = HBufC::NewLC( editContentLen );
  2361     HBufC* currentEditorContentBuf = HBufC::NewLC( editContentLen );
  2340     TPtr16 currentEditorContent = currentEditorContentBuf->Des();
  2362     TPtr16 currentEditorContent = currentEditorContentBuf->Des();
  2341 	edit->GetEditorContentForFep( currentEditorContent, 0, editContentLen ); 
  2363 	edit->GetEditorContentForFep( currentEditorContent, 0, editContentLen ); 
  2342 	
  2364 	
  2343 	TBool send = ETrue;
  2365 	if (SetSyncIcfDataL( icfData, lastEditorContent, currentEditorContent))
  2344 	
       
  2345 	if ( !SetSyncIcfDataL( icfData, lastEditorContent, currentEditorContent ) )
       
  2346     	{
  2366     	{
  2347     	send = EFalse;
  2367 		iCurrentPluginInputFepUI->HandleCommandL
       
  2368 			(ECmdPenInputSendEditorTextAndCurPos, reinterpret_cast<TInt>(&icfData));
       
  2369 		iFepMan.TryPopExactWordInICFL();
  2348     	}
  2370     	}
  2349 
  2371 
  2350     if ( send )
       
  2351     	{
       
  2352     	iCurrentPluginInputFepUI->HandleCommandL
       
  2353             (ECmdPenInputSendEditorTextAndCurPos, reinterpret_cast<TInt>(&icfData));
       
  2354     	}
       
  2355     	
       
  2356     if ( secretEditor ) 
  2372     if ( secretEditor ) 
  2357         { 
  2373         { 
  2358         TBool cursorDisabled = IsEditorCursorDisabled(); 
  2374         TBool cursorDisabled = IsEditorCursorDisabled(); 
  2359         iCurrentPluginInputFepUI->HandleCommandL( ECmdPenInputDimArrowKeys, cursorDisabled );        
  2375         iCurrentPluginInputFepUI->HandleCommandL( ECmdPenInputDimArrowKeys, cursorDisabled );        
  2360         } 
  2376         } 
  2588         // update curosr pos
  2604         // update curosr pos
  2589         aIcfData.iCmd = EPeninputICFSetCurSel;
  2605         aIcfData.iCmd = EPeninputICFSetCurSel;
  2590         aIcfData.iStartPos = iCurSelCur.iCursorPos;
  2606         aIcfData.iStartPos = iCurSelCur.iCursorPos;
  2591         aIcfData.iMidPos = -1;
  2607         aIcfData.iMidPos = -1;
  2592         aIcfData.iText.Set(KNullDesC);
  2608         aIcfData.iText.Set(KNullDesC);
       
  2609         if( iFepMan.IsFlagSet(CAknFepManager::EFlagSupressAutoUpdate) && iFepMan.InputMode() == EHangul )
       
  2610         	{
       
  2611 			aIcfData.iCursorSelVisible = EFalse;
       
  2612         	}
  2593         }
  2613         }
  2594         
  2614         
  2595     iInlineStateOn = ( aIcfData.iMidPos == 0 );
  2615     iInlineStateOn = ( aIcfData.iMidPos == 0 );
  2596 	
  2616 	
  2597     return ETrue;
  2617     return ETrue;
  3778             iCurrentPluginInputFepUI->HandleCommandL(ECmdPenInputFingerSpelling, 0);
  3798             iCurrentPluginInputFepUI->HandleCommandL(ECmdPenInputFingerSpelling, 0);
  3779               SetPromptText( aCleanContent );     
  3799               SetPromptText( aCleanContent );     
  3780               }
  3800               }
  3781         else
  3801         else
  3782             {
  3802             {
  3783             SetITUTSpellingStateL(ETrue);
  3803             if ( !iInSpellMode )
       
  3804             	{
       
  3805 				SetITUTSpellingStateL(ETrue);
       
  3806 				iInSpellMode = ETrue;
       
  3807             	}
       
  3808             
  3784             iIndicatorImgID = 0;
  3809             iIndicatorImgID = 0;
  3785             iIndicatorTextID = 0;
  3810             iIndicatorTextID = 0;
  3786             }    
  3811             }    
  3787         UpdateITUTIndicator();       
  3812         UpdateITUTIndicator();       
  3788         }
  3813         }
  4243 
  4268 
  4244     TRAP_IGNORE(iCurrentPluginInputFepUI->HandleCommandL(ECmdPenInputFingerMatchList, 
  4269     TRAP_IGNORE(iCurrentPluginInputFepUI->HandleCommandL(ECmdPenInputFingerMatchList, 
  4245                                                          reinterpret_cast<TInt>(&iSendAllList)));
  4270                                                          reinterpret_cast<TInt>(&iSendAllList)));
  4246     }
  4271     }
  4247 
  4272 
  4248 TBool CAknFepPluginManager::DoNextCandidates()
       
  4249     {
       
  4250     if((iCandidateIndex) * 3 >= iCandidateList.Count())
       
  4251         {
       
  4252         iCandidateIndex = 0;
       
  4253         }
       
  4254         
       
  4255     iCandidateIndex++;           
       
  4256     
       
  4257     int nStartIndex = (iCandidateIndex - 1) * 3;
       
  4258 
       
  4259     
       
  4260     for (TInt index = 0; index < 3; index++, nStartIndex ++)
       
  4261         {
       
  4262         if (nStartIndex < iCandidateList.Count())
       
  4263             {
       
  4264             TPtr16 canDes = iCandidateList[nStartIndex]->Des();
       
  4265             iSendList.iCandidate[index].Set(canDes);
       
  4266             }
       
  4267         else
       
  4268             {
       
  4269             iSendList.iCandidate[index].Set(KNullDesC);
       
  4270             }
       
  4271         }
       
  4272         
       
  4273     
       
  4274     TRAP_IGNORE(iCurrentPluginInputFepUI->HandleCommandL(ECmdPenInputFingerMatchList, 
       
  4275                                                          reinterpret_cast<TInt>(&iSendList)));    
       
  4276     
       
  4277     if (iCandidateIndex * 3 >= iCandidateList.Count())
       
  4278         {
       
  4279         return ETrue;
       
  4280         }
       
  4281     
       
  4282     return EFalse;
       
  4283     }
       
  4284     
       
  4285 void CAknFepPluginManager::DoPreviousCandidates()
       
  4286     {
       
  4287     iCandidateIndex--;
       
  4288       
       
  4289     if(iCandidateIndex < 1)
       
  4290         {
       
  4291         iCandidateIndex = iCandidateList.Count() / 3 + 1;
       
  4292         }
       
  4293         
       
  4294     int nStartIndex = (iCandidateIndex -1) * 3;
       
  4295         
       
  4296     for (TInt index = 0; index < 3; index++, nStartIndex ++)
       
  4297         {
       
  4298         if (nStartIndex < iCandidateList.Count())
       
  4299             {
       
  4300             TPtr16 canDes = iCandidateList[nStartIndex]->Des();
       
  4301             iSendList.iCandidate[index].Set(canDes);
       
  4302             }
       
  4303         else
       
  4304             {
       
  4305             iSendList.iCandidate[index].Set(KNullDesC);
       
  4306             }
       
  4307         }
       
  4308         
       
  4309     
       
  4310     TRAP_IGNORE(iCurrentPluginInputFepUI->HandleCommandL(ECmdPenInputFingerMatchList, 
       
  4311                                                          reinterpret_cast<TInt>(&iSendList)));    
       
  4312     }
       
  4313     
       
  4314 TBool CAknFepPluginManager::GetIndicatorImgID(const TInt IndicatorUID,TInt &aImage, TInt &aMask)
  4273 TBool CAknFepPluginManager::GetIndicatorImgID(const TInt IndicatorUID,TInt &aImage, TInt &aMask)
  4315     {
  4274     {
  4316     TBool ret = EFalse;
  4275     TBool ret = EFalse;
  4317     TRAP_IGNORE(ret = GetIndicatorImgIDL(IndicatorUID, aImage, aMask));
  4276     TRAP_IGNORE(ret = GetIndicatorImgIDL(IndicatorUID, aImage, aMask));
  4318     return ret;
  4277     return ret;
  4679             }
  4638             }
  4680         }
  4639         }
  4681         
  4640         
  4682     return resId;
  4641     return resId;
  4683     }
  4642     }
       
  4643 
       
  4644 void CAknFepPluginManager::SetInSpellModeFlag( TBool aFlag )
       
  4645 	{
       
  4646 	iInSpellMode = aFlag;
       
  4647 	}
  4684 
  4648 
  4685 void CAknFepPluginManager::SetPromptText( TBool aCleanContent )
  4649 void CAknFepPluginManager::SetPromptText( TBool aCleanContent )
  4686     {
  4650     {
  4687     if (IsDimed() && !iResourceChange) 
  4651     if (IsDimed() && !iResourceChange) 
  4688         { 
  4652         { 
  5256         {
  5220         {
  5257         iTooltipOpenOnFSQ = EFalse;
  5221         iTooltipOpenOnFSQ = EFalse;
  5258         return;
  5222         return;
  5259         }
  5223         }
  5260     
  5224     
  5261 	CDesCArray* candidates = new ( ELeave ) CDesCArrayFlat( KDefaultCandidateArraySize );
  5225 	CDesCArray* candidates = new (ELeave) CDesCArrayFlat(KDefaultCandidateArraySize);
  5262 	CleanupStack::PushL( candidates );
  5226 	CleanupStack::PushL(candidates);
  5263 	TInt activeIdx = KErrNotFound;
  5227 	TInt activeIdx = KErrNotFound;
  5264 	iFepMan.GetCandidatesL( *candidates, activeIdx );
  5228 	iFepMan.GetCandidatesL(*candidates, activeIdx);
  5265 	if ( aSecondaryIdx < candidates->Count() )
  5229 	
       
  5230 	if (aSecondaryIdx < candidates->Count())
  5266 		{
  5231 		{
  5267 		TPtrC aText = ( *candidates )[ aSecondaryIdx ];
  5232 		TPtrC aText = (*candidates)[aSecondaryIdx];
  5268 
       
  5269 	    TFepITITooltipText tooltipText;
       
  5270 	    tooltipText.iDataSize = aText.Size();
       
  5271 	    tooltipText.iText.Set( aText );    
       
  5272 	    TPtrC tooltipTextPtr;
       
  5273 	    tooltipTextPtr.Set( aText );    
       
  5274 	    iCurrentPluginInputFepUI->HandleCommandL( ECmdPenInputPopupTooltip, 
       
  5275 	                                reinterpret_cast<TInt>( &tooltipTextPtr ) );
       
  5276 	    
  5233 	    
       
  5234    	    iCurrentPluginInputFepUI->HandleCommandL(
       
  5235    	    		ECmdPenInputPopupTooltip,  reinterpret_cast<TInt>(&aText));
  5277 	    iTooltipOpenOnFSQ = ETrue;		
  5236 	    iTooltipOpenOnFSQ = ETrue;		
  5278 		}
  5237 		}
  5279 	else
  5238 	else
  5280 		{
  5239 		{
  5281 		iTooltipOpenOnFSQ = EFalse;
  5240 		iTooltipOpenOnFSQ = EFalse;
  5629     	{
  5588     	{
  5630     	return;
  5589     	return;
  5631     	}
  5590     	}
  5632     
  5591     
  5633     // Close FSQ then current keyboard type return to the previously-stored one,
  5592     // Close FSQ then current keyboard type return to the previously-stored one,
  5634     // 1. The first step is to restore keyboard type, because the value will
  5593     // But, if iSharedData.QwertyInputMode() == EFalse, it means that hardware 
  5635     // be used in iFepMan.SetQwertyMode( EFalse );
  5594     // is slided, and capserver will be responsible to set the corrected keyboard type
  5636     ResetItiKeyboardLayoutL();
  5595     // and qwerty input mode. 
  5637     
  5596     // So there is no need to do step 1 and step 2 here, otherwise, 
  5638     // 2. Change FEP to non qwerty mode.
  5597     // values set by capserver will be overrided.
  5639     iFepMan.SetQwertyMode( EFalse );
  5598     if ( !iSharedData.QwertyInputMode() )
  5640 
  5599     	{    
       
  5600 		// 1. The first step is to restore keyboard type, because the value will
       
  5601 		// be used in iFepMan.SetQwertyMode( EFalse );
       
  5602 		ResetItiKeyboardLayoutL();
       
  5603 		
       
  5604 		// 2. Change FEP to non qwerty mode.
       
  5605 		iFepMan.SetQwertyMode( EFalse );    
       
  5606     	}
       
  5607     
  5641     // 3. Notify the deactivation of ITI to peninputserver        
  5608     // 3. Notify the deactivation of ITI to peninputserver        
  5642     iCurrentPluginInputFepUI->HandleCommandL( ECmdPeninputITIStatus, EFalse );    
  5609     iCurrentPluginInputFepUI->HandleCommandL( ECmdPeninputITIStatus, EFalse );    
  5643  
  5610  
  5644     // 4. Clear ITI configured flag;
  5611     // 4. Clear ITI configured flag;
  5645     iIsITIConfigured = EFalse; 
  5612     iIsITIConfigured = EFalse; 
  5653     { 
  5620     { 
  5654     if ( iLastKeyboardLayout || !IsSupportITIOnFSQ() )
  5621     if ( iLastKeyboardLayout || !IsSupportITIOnFSQ() )
  5655         {
  5622         {
  5656         return;
  5623         return;
  5657         }    
  5624         }    
  5658     // 1. Record the previous keyboard type
  5625     // 1. Record the previous virtual keyboard type    
  5659     RProperty keyboardLayoutStatusProperty;
  5626     RProperty::Get( KPSUidAknFep, KAknFepVirtualKeyboardType, iLastKeyboardLayout );
  5660     keyboardLayoutStatusProperty.Get( KCRUidAvkon, KAknKeyBoardLayout, 
  5627     
  5661                                           iLastKeyboardLayout );
       
  5662 
       
  5663     // 2. Utilize right qwerty keyboard type
  5628     // 2. Utilize right qwerty keyboard type
  5664     keyboardLayoutStatusProperty.Set( KCRUidAvkon, KAknKeyBoardLayout, 
  5629     RProperty::Set( KPSUidAknFep, KAknFepVirtualKeyboardType, EPtiKeyboardQwerty4x12 );
  5665                                       EPtiKeyboardQwerty4x12 ); 
  5630     
  5666     }
  5631     }
       
  5632 
  5667 // -----------------------------------------------------------------------------
  5633 // -----------------------------------------------------------------------------
  5668 // Restore keyboard layout after closing FSQ.
  5634 // Restore keyboard layout after closing FSQ.
  5669 // -----------------------------------------------------------------------------
  5635 // -----------------------------------------------------------------------------
  5670 //
  5636 //
  5671 void CAknFepPluginManager::ResetItiKeyboardLayoutL()
  5637 void CAknFepPluginManager::ResetItiKeyboardLayoutL()
  5672     {    
  5638     {    
  5673     if ( !iLastKeyboardLayout || iITISettingDialogOpen )
  5639     if ( !iLastKeyboardLayout )
  5674     	{
  5640     	{
  5675     	return;
  5641     	return;
  5676     	}
  5642     	}
  5677     
  5643     
  5678     // Close FSQ then current keyboard type return to the previously-stored one,
  5644     // Close FSQ then current keyboard type return to the previously-stored one,
  5679     //Restore keyboard layout type and qwerty mode of FEP        
  5645     //Restore keyboard layout type and qwerty mode of FEP        
  5680     // 1. Store the previous keyboard type, 
  5646     // 1. Store the previous keyboard type, 
  5681     // except that opening predictive setting dialog cause fsq closed.        
  5647     // except that opening predictive setting dialog cause fsq closed.    
  5682     RProperty keyboardLayoutStatusProperty;
  5648     RProperty::Set( KPSUidAknFep, KAknFepVirtualKeyboardType, 
  5683     keyboardLayoutStatusProperty.Set( KCRUidAvkon, KAknKeyBoardLayout, 
       
  5684                                           iLastKeyboardLayout );
  5649                                           iLastKeyboardLayout );
       
  5650     
       
  5651     
  5685     iLastKeyboardLayout = 0;        
  5652     iLastKeyboardLayout = 0;        
  5686     }
  5653     }
  5687 
  5654 
  5688 // -----------------------------------------------------------------------------
  5655 // -----------------------------------------------------------------------------
  5689 // Restore predict state.
  5656 // Restore predict state.