fep/aknfep/src/AknFepPluginManager.cpp
branchRCL_3
changeset 3 f5a1e66df979
parent 0 eb1f2e154e89
child 5 a47de9135b21
equal deleted inserted replaced
0:eb1f2e154e89 3:f5a1e66df979
    72 #include <eikgted.h> 
    72 #include <eikgted.h> 
    73 
    73 
    74 #include <apgwgnam.h>
    74 #include <apgwgnam.h>
    75 
    75 
    76 #include <PtiKeyMappings.h>
    76 #include <PtiKeyMappings.h>
    77 #include <aknpriv.hrh>
    77 #include <AknPriv.hrh>
    78 
    78 
    79 // Constants
    79 // Constants
    80 const TInt KCursorBlinkPerioid = 10000;//300000; // five tenth of a second * 2
    80 const TInt KCursorBlinkPerioid = 10000;//300000; // five tenth of a second * 2
    81 const TInt KMaxServerDataLength = 50;
    81 const TInt KMaxServerDataLength = 50;
    82 const TUint KVkbParagraphSeparator = 0x2029;
    82 const TUint KVkbParagraphSeparator = 0x2029;
   733                 iFepMan.CommitInlineEditL();
   733                 iFepMan.CommitInlineEditL();
   734                 // Need to commit into engine, it will clear textbuffer in it.
   734                 // Need to commit into engine, it will clear textbuffer in it.
   735                 iFepMan.PtiEngine()->CommitCurrentWord();
   735                 iFepMan.PtiEngine()->CommitCurrentWord();
   736                 }
   736                 }
   737                 break;
   737                 break;
   738             case ESignalStartInlineText:
       
   739                 {
       
   740                 if (!(iFepMan.IsFlagSet(CAknFepManager::EFlagInsideInlineEditingTransaction)))
       
   741                     {
       
   742 					TBuf<CAknFepManager::EMaximumFepWordLength> textToUncommit;
       
   743 					TBool comsumeKey;
       
   744 					
       
   745 					if (!(iFepMan.TryGetTextToUncommitL(textToUncommit, comsumeKey)))
       
   746 						{
       
   747 						// If T9 word length > 32, the navi key is consumed without action.
       
   748 						// Maybe should navigate inside word.
       
   749 						return comsumeKey;
       
   750 						}
       
   751 					iFepMan.PtiEngine()->ClearCurrentWord();
       
   752 					iFepMan.PtiEngine()->SetCurrentWord(textToUncommit); // this set the input sequence of PtiEngine          
       
   753 					iFepMan.StartInlineEditL(iFepMan.UncommittedText(), textToUncommit, 
       
   754 											 textToUncommit.Length(), EFalse);
       
   755 
       
   756                     // update ICF content
       
   757                     SendIcfDataL();
       
   758                     }
       
   759                 }
       
   760                 break;
       
   761             case ESignalCommitITIInlineText:
   738             case ESignalCommitITIInlineText:
   762                 {
   739                 {
   763                 // Commit autocompletion
   740                 // Commit autocompletion
   764                 iFepMan.CommitInlineEditL();
   741                 iFepMan.CommitInlineEditL();
   765                 // Need to commit into engine, it will clear textbuffer in it.
   742                 // Need to commit into engine, it will clear textbuffer in it.
  1257                 iIndicatorTextID = 0;           
  1234                 iIndicatorTextID = 0;           
  1258                 }            
  1235                 }            
  1259             }
  1236             }
  1260         }
  1237         }
  1261 
  1238 
  1262     if ( iPluginInputMode == EPluginInputModeFSQ  && iOrientationChanged )
  1239     if ( iPluginInputMode == EPluginInputModeFSQ  && iOrientationChanged 
       
  1240     	                                            && !iITISettingDialogOpen )
  1263         {
  1241         {
  1264 		// This TRAP_IGNORE is essential to fix bug ECJA-7JDCKR, never delete it
  1242 		// This TRAP_IGNORE is essential to fix bug ECJA-7JDCKR, never delete it
  1265         TRAP_IGNORE( iAvkonAppUi->SetOrientationL( (CAknAppUiBase::TAppUiOrientation)iDefaultOrientation ) );
  1243         TRAP_IGNORE( iAvkonAppUi->SetOrientationL( (CAknAppUiBase::TAppUiOrientation)iDefaultOrientation ) );
  1266         iOrientationChanged = EFalse;
  1244         iOrientationChanged = EFalse;
  1267         } 
  1245         } 
  4215         promptText.iText.Set(offPromot);
  4193         promptText.iText.Set(offPromot);
  4216         promptText.iCleanContent = EFalse;
  4194         promptText.iCleanContent = EFalse;
  4217         
  4195         
  4218         iCurrentPluginInputFepUI->HandleCommandL(ECmdPenInputSetPromptText,
  4196         iCurrentPluginInputFepUI->HandleCommandL(ECmdPenInputSetPromptText,
  4219             reinterpret_cast<TInt>(&promptText));
  4197             reinterpret_cast<TInt>(&promptText));
  4220             
  4198          
  4221         iCurrentPluginInputFepUI->HandleCommandL(ECmdPenInputFingerSpelling, 0);
  4199         iCurrentPluginInputFepUI->HandleCommandL(ECmdPenInputFingerSpelling, 0);
  4222         }
  4200         }
  4223     }
  4201     }
  4224 
  4202 
  4225 void CAknFepPluginManager::DisplaySpellEditor(const TInt aEditorFlag, 
  4203 void CAknFepPluginManager::DisplaySpellEditor(const TInt aEditorFlag, 
  5159 #ifdef RD_INTELLIGENT_TEXT_INPUT
  5137 #ifdef RD_INTELLIGENT_TEXT_INPUT
  5160     if ( aKeyEvent.iScanCode != EPtiKeyNone 
  5138     if ( aKeyEvent.iScanCode != EPtiKeyNone 
  5161          && ( iPluginPrimaryRange == ERangeNative 
  5139          && ( iPluginPrimaryRange == ERangeNative 
  5162               || iPluginPrimaryRange == ERangeEnglish
  5140               || iPluginPrimaryRange == ERangeEnglish
  5163               || ( iPluginPrimaryRange == 0 && iFepMan.InputMode() != ENumber 
  5141               || ( iPluginPrimaryRange == 0 && iFepMan.InputMode() != ENumber 
  5164                    && iFepMan.InputMode() != ENativeNumber) )
  5142                    && iFepMan.InputMode() != ENativeNumber) ) )
  5165          && ( TChar( aKeyEvent.iCode ).IsAlpha() || IsDeadKeyCode( aKeyEvent.iCode ) ) 
       
  5166           )
       
  5167         {
  5143         {
  5168         return ETrue;
  5144         return ETrue;
  5169         }
  5145         }
  5170     return EFalse;
  5146     return EFalse;
  5171 #else
  5147 #else
  5319     RProperty keyboardLayoutStatusProperty;
  5295     RProperty keyboardLayoutStatusProperty;
  5320     keyboardLayoutStatusProperty.Get( KCRUidAvkon, KAknKeyBoardLayout, 
  5296     keyboardLayoutStatusProperty.Get( KCRUidAvkon, KAknKeyBoardLayout, 
  5321                                           iLastKeyboardLayout );
  5297                                           iLastKeyboardLayout );
  5322 
  5298 
  5323     // 2. Utilize right qwerty keyboard type
  5299     // 2. Utilize right qwerty keyboard type
  5324     TPtiKeyboardType keyboardType = EPtiKeyboardQwerty4x12;
       
  5325     RArray<TPtiKeyboardType> supportedKeyboards;
       
  5326     CleanupClosePushL( supportedKeyboards );
       
  5327     iFepMan.PtiEngine()->KeyboardTypesSupportedByLanguageL
       
  5328                     ( iSharedData.PenInputLanguage(), supportedKeyboards );   
       
  5329     for ( TInt i = 0; i < supportedKeyboards.Count(); i ++ )
       
  5330         {        
       
  5331         if ( supportedKeyboards[i] == EPtiKeyboardQwerty4x12 
       
  5332              || supportedKeyboards[i] == EPtiKeyboardQwerty3x11
       
  5333              || supportedKeyboards[i] == EPtiKeyboardQwerty4x10
       
  5334              || supportedKeyboards[i] == EPtiKeyboardCustomQwerty )
       
  5335             {
       
  5336             keyboardType = supportedKeyboards[i];
       
  5337             break;
       
  5338             }        
       
  5339         }
       
  5340     keyboardLayoutStatusProperty.Set( KCRUidAvkon, KAknKeyBoardLayout, 
  5300     keyboardLayoutStatusProperty.Set( KCRUidAvkon, KAknKeyBoardLayout, 
  5341                                       keyboardType );
  5301                                       EPtiKeyboardQwerty4x12 ); 
  5342     CleanupStack::PopAndDestroy( &supportedKeyboards );    
       
  5343     }
  5302     }
  5344 // -----------------------------------------------------------------------------
  5303 // -----------------------------------------------------------------------------
  5345 // Restore keyboard layout after closing FSQ.
  5304 // Restore keyboard layout after closing FSQ.
  5346 // -----------------------------------------------------------------------------
  5305 // -----------------------------------------------------------------------------
  5347 //
  5306 //
  5378         {
  5337         {
  5379         iAutoCompBeforePluginInput = EFalse;
  5338         iAutoCompBeforePluginInput = EFalse;
  5380         iFepMan.SetWesternAutoComplete(ETrue);        
  5339         iFepMan.SetWesternAutoComplete(ETrue);        
  5381         iFepMan.TryChangeModeL(ELatin);      
  5340         iFepMan.TryChangeModeL(ELatin);      
  5382         }
  5341         }
       
  5342     if ( IsSupportITIOnFSQ() )
       
  5343     	{        
       
  5344         iCurrentPluginInputFepUI->HandleCommandL( ECmdPeninputITIStatus,
       
  5345                                                   iFepMan.WesternPredictive() );    	
       
  5346     	}
  5383     }
  5347     }
  5384 
  5348 
  5385 // -----------------------------------------------------------------------------
  5349 // -----------------------------------------------------------------------------
  5386 // Check if the keycode belongs to dead keys.
  5350 // Check if the keycode belongs to dead keys.
  5387 // -----------------------------------------------------------------------------
  5351 // -----------------------------------------------------------------------------
  5470 
  5434 
  5471 void CConnectAo::DoCancel()
  5435 void CConnectAo::DoCancel()
  5472     {
  5436     {
  5473     
  5437     
  5474     }
  5438     }
  5475 TInt CConnectAo::RunError(TInt aError)
  5439 TInt CConnectAo::RunError(TInt /*aError*/)
  5476     {
  5440     {
  5477     return KErrNone;
  5441     return KErrNone;
  5478     }
  5442     }
  5479 
  5443 
  5480 void CConnectAo::RequestConnect()
  5444 void CConnectAo::RequestConnect()