Revision: 201033 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 14 Sep 2010 21:59:06 +0300
branchRCL_3
changeset 22 bd83ceabce89
parent 21 ecbabf52600f
Revision: 201033 Kit: 201035
fep/aknfep/conf/aknfep.confml
fep/aknfep/conf/aknfep_101F876D.crml
fep/aknfep/inc/AknFepUiInputStateEntryQwertyWesternPredictive.h
fep/aknfep/inc/AknFepUiInputStateInitialChineseGenericQwerty.h
fep/aknfep/inc/AknFepUiManagerBase.h
fep/aknfep/inc/AknFepUiManagerChinese.h
fep/aknfep/inc/aknfepuiinputminiqwertypinyinphrasebase.h
fep/aknfep/src/AknFepManager.cpp
fep/aknfep/src/AknFepPluginManager.cpp
fep/aknfep/src/AknFepUiInputStateEntryMiniQwertyZhuyinPhrase.cpp
fep/aknfep/src/AknFepUiInputStateEntryQwertyWesternPredictive.cpp
fep/aknfep/src/AknFepUiInputStateInitialChineseGenericQwerty.cpp
fep/aknfep/src/AknFepUiManagerBase.cpp
fep/aknfep/src/AknFepUiManagerChinese.cpp
fep/aknfep/src/aknfepuiinputminiqwertypinyinphrasebase.cpp
fep/aknfep/src/aknfepuiinputstateminiqwertyzhuyinphrase.cpp
inputmethods_plat/aknfep_settings_api/inc/AknFepInternalCRKeys.h
inputmethods_plat/pen_input_server_api/inc/peninputclient.h
inputmethods_plat/pen_input_server_api/inc/peninputcmd.h
textinput/peninputarc/bwins/peninputClientU.DEF
textinput/peninputarc/eabi/peninputClientU.DEF
textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayout.h
textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputtapsettingmanager.h
textinput/peninputarc/inc/pensrvcliinc/peninputanimclientobj.h
textinput/peninputarc/inc/pensrvcliinc/peninputanimcommand.h
textinput/peninputarc/inc/pensrvcliinc/peninputclientimpl.h
textinput/peninputarc/inc/pensrvcliinc/peninputclientserver.h
textinput/peninputarc/inc/pensrvcliinc/peninputcmdparamext.h
textinput/peninputarc/inc/pensrvcliinc/peninputserver.h
textinput/peninputarc/inc/pensrvcliinc/penpointereventsuppressor.h
textinput/peninputarc/inc/pensrvcliinc/penuiwndctrl.h
textinput/peninputarc/inc/pensrvcliinc/rpeninputanim.h
textinput/peninputarc/src/peninputanim/peninputanim.cpp
textinput/peninputarc/src/peninputanim/penpointereventsuppressor.cpp
textinput/peninputarc/src/peninputclient/penclientimpl.cpp
textinput/peninputarc/src/peninputclient/peninputclient.cpp
textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbutton.cpp
textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutcontrol.mmp
textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutvkbkeyctrl.cpp
textinput/peninputarc/src/peninputlayoutcontrol/peninputtapsettingmanager.cpp
textinput/peninputarc/src/peninputlayoutcontrol/peninputuilayout.cpp
textinput/peninputarc/src/peninputserverapp/peninputanimclientobj.cpp
textinput/peninputarc/src/peninputserverapp/peninputanimcommand.cpp
textinput/peninputarc/src/peninputserverapp/peninputserver.cpp
textinput/peninputarc/src/peninputserverapp/peninputserversession.cpp
textinput/peninputarc/src/peninputserverapp/penuiwndctrl.cpp
textinput/peninputarc/src/peninputserverapp/rpeninputanim.cpp
textinput/peninputfingerhwr/src/peninputfingerhwrwnd.cpp
textinput/peninputgenericitut/src/peninputgenericitutdatamgr.cpp
textinput/peninputgenericvkb/src/peninputgenericlafdatamgr.cpp
textinput/peninputsplititut/src/peninputsplititutdatamgr.cpp
textinput/peninputsplitqwerty/src/peninputsplitqwertylafdatamgr.cpp
textinput/peninputvkbcn/ctrlsrc/peninputvkbclientarea.cpp
textinput/peninputvkbcn/inc/peninputvkbcnlafdatamgr.h
textinput/peninputvkbcn/src/peninputvkbcnlafdatamgr.cpp
textinput/ptienginev2/inc/PtiEngineImpl.h
textinput/ptienginev2/src/PtiEngineImpl.cpp
textinput/ptienginev2/src/PtiKeyMapData.cpp
textinput/ptienginev2/src/PtiKeyMappings.cpp
textinput/ptienginev2/src/Ptiqwertykeymappings.cpp
Binary file fep/aknfep/conf/aknfep.confml has changed
Binary file fep/aknfep/conf/aknfep_101F876D.crml has changed
--- a/fep/aknfep/inc/AknFepUiInputStateEntryQwertyWesternPredictive.h	Wed Sep 01 12:23:33 2010 +0100
+++ b/fep/aknfep/inc/AknFepUiInputStateEntryQwertyWesternPredictive.h	Tue Sep 14 21:59:06 2010 +0300
@@ -93,6 +93,24 @@
     * @param    aLength The key press length.
     */
     TBool HandleNaviKeysL(TInt aKey, TKeyPressLength aLength);
+private:
+	
+	/**
+    * Get scancode from given character and textcase
+    * @param    aChar    The character to be checked against to gain the scancode
+    * @param    aCase    The textcase info
+    */
+    TInt ScanCodeForCharacter( TUint aChar, TPtiTextCase& aCase );
+	
+	/**
+    * Check whether the character mapped on given key
+    * @param    aKey    The scancode of the key to be checked.
+    * @param    aMode   The InputMode regarding ptiengine
+	* @param    aAgainst The character to be checked.
+	* @param    aCase    Text case.
+	* @Return   ETrue : yes it is on the key; EFalse : No it is not on the Key
+    */
+    TBool MapAgainst(TInt aKey, TInt aMode, TInt16 aAgainst, TInt aCase) const;
 };
 
 #endif //__AKN_FEP_UI_INPUT_STATE_ENTRY_QWERTY_WESTERN_PREDICTIVE_H__
--- a/fep/aknfep/inc/AknFepUiInputStateInitialChineseGenericQwerty.h	Wed Sep 01 12:23:33 2010 +0100
+++ b/fep/aknfep/inc/AknFepUiInputStateInitialChineseGenericQwerty.h	Tue Sep 14 21:59:06 2010 +0300
@@ -43,6 +43,7 @@
     TBool IsSCTKey(TInt aKey);
     TBool IsCharacter(TInt aKey);
     TBool HandleKeyByShiftOrCharPressed(TInt aKey, TKeyPressLength aLength);
+    TInt ToneMark(TInt aKey, TDes& aResult);
     };
 
 #endif //__AKN_FEP_UI_INPUT_STATE_INIT_CHIN_GEN_QWERTY_H__
--- a/fep/aknfep/inc/AknFepUiManagerBase.h	Wed Sep 01 12:23:33 2010 +0100
+++ b/fep/aknfep/inc/AknFepUiManagerBase.h	Tue Sep 14 21:59:06 2010 +0300
@@ -442,6 +442,16 @@
     * @since 3.2
     */
     virtual TBool RollbackPreviousCharL();
+	
+	/**
+    * Check whether the character mapped on given key
+    * @param    aKey    The scancode of the key to be checked.
+    * @param    aMode   The InputMode regarding ptiengine
+	* @param    aAgainst The character to be checked.
+	* @param    aCase    Text case.
+	* @Return   ETrue : yes it is on the key; EFalse : No it is not on the Key
+    */
+    TBool MapAgainst(TInt aKey, TInt aMode, TInt16 aAgainst, TInt aCase) const;
 
 #endif //RD_INTELLIGENT_TEXT_INPUT
 #endif // __ITI_LONGPRESS_NUM_SHIFT_COPYPASTE__
--- a/fep/aknfep/inc/AknFepUiManagerChinese.h	Wed Sep 01 12:23:33 2010 +0100
+++ b/fep/aknfep/inc/AknFepUiManagerChinese.h	Tue Sep 14 21:59:06 2010 +0300
@@ -275,6 +275,16 @@
      */
     void ConstructL(TLanguage aLanguage);
 
+	/**
+	* Tell whether this key mapped valid zhuyin, pinyin, or cangjie symbol
+	*/
+    TBool IsValidChineseInputSymbol(TInt aKey, TPtiEngineInputMode aMode) const;
+	
+	/**
+	* Tell whether this key mapped valid chinese tone mark
+	*/
+    TBool IsValidChineseToneMarkKey(TInt aKey, TPtiEngineInputMode aMode) const;
+
 private: // Data
     TAknFepInputStateChineseBase iFepUiState;
     MAknFepUICtrlContainerChinese* iContainerPane;
--- a/fep/aknfep/inc/aknfepuiinputminiqwertypinyinphrasebase.h	Wed Sep 01 12:23:33 2010 +0100
+++ b/fep/aknfep/inc/aknfepuiinputminiqwertypinyinphrasebase.h	Tue Sep 14 21:59:06 2010 +0300
@@ -534,7 +534,15 @@
       * @return None.
       */
     void DoActionAfterCommitL();
+	/**
+      * Get real pinyin symbol from scancode.
+      *
+      * @since S60 v3.2.3
+      * @param aKey 
+      * @return None.
+      */
     
+    void MapKey(TInt& aKey);
     };		
 
 #endif //T_AKNFEPUIINPUTMINIQWERTYPINYINPHRASEBASE_H
--- a/fep/aknfep/src/AknFepManager.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/fep/aknfep/src/AknFepManager.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -6305,7 +6305,8 @@
         
         TBool isCangJieSupported = EFalse;
 #ifdef RD_INTELLIGENT_TEXT_INPUT
-        if ( EPtiKeyboardQwerty3x11 == KeyboardLayout() )
+        if ( EPtiKeyboardQwerty3x11 == KeyboardLayout() ||
+             EPtiKeyboardQwerty4x10 == KeyboardLayout())
         	{
         	isCangJieSupported = ETrue;
         	}
@@ -12295,31 +12296,30 @@
 	        }
   
         if (!iLanguageCapabilities.iLocalInputLanguageInUse)
-        	{
-        	switch (iSharedDataInterface->InputTextLanguage())
-            	{
-            	case ELangPrcChinese:
-            		{
-            		iSharedDataInterface->SetInputMode(EPinyin);
-            		SetFlag(EFlagNewSharedDataInputMode);
-            		break;            		
-            		}
+            {
+            switch (iSharedDataInterface->InputTextLanguage())
+                {
+                case ELangPrcChinese:
+                    {
+                    iSharedDataInterface->SetInputMode(EPinyin);
+                    SetFlag(EFlagNewSharedDataInputMode);
+                    break;
+                    }
             	case ELangTaiwanChinese:
-            		{
-            	    iSharedDataInterface->SetInputMode(EZhuyin);
-            	    SetFlag(EFlagNewSharedDataInputMode);
-            	    break;
-            		}
-            	case ELangHongKongChinese:
-            		{
-            	    iSharedDataInterface->SetInputMode(EStroke);
-            	    iSharedDataInterface->SetCangJieMode(ECangJieNormal);
-            	    SetFlag(EFlagNewSharedDataInputMode);
-            	    break;
-            		}
-            	default:
-            		break;
-            	}
+                    {
+                    iSharedDataInterface->SetInputMode(EZhuyin);
+                    SetFlag(EFlagNewSharedDataInputMode);
+                    break;
+                    }
+                case ELangHongKongChinese:
+                    {
+                    iSharedDataInterface->SetInputMode(EStroke);
+                    SetFlag(EFlagNewSharedDataInputMode);
+                    break;
+                    }
+                default:
+                    break;
+                }
             }
 
     	SetHashKeyStyle();
--- a/fep/aknfep/src/AknFepPluginManager.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/fep/aknfep/src/AknFepPluginManager.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -153,6 +153,17 @@
         return ETrue;
     return EFalse;
     }
+
+// -----------------------------------------------------------------------------
+// Check if the app specified by aUid is avkon notify server
+// -----------------------------------------------------------------------------
+//
+TBool IsAknNotifyServerApp( const TUid& aUid )
+    {
+    const TInt KAknNotifySrvUid = 0x10281EF2; 
+    return aUid.iUid == KAknNotifySrvUid;
+    }
+
 #ifdef RD_SCALABLE_UI_V2
 inline TBool IsAbleTouseCallBubble()
     {
@@ -305,7 +316,10 @@
     if( !iPenInputSvrConnected || !iPenInputServer.IsVisible() || iPenInputServer.IsDimmed() )
         {
         if( iFepMan.FepAwareTextEditor() )
-            {            
+            {
+            // Enable transition effect when close pen ui 
+            // by pressing close button.
+            iPenInputServer.EnableGfxTransEffect( ETrue );
   			iPreferredUiMode = ETrue;	
             TryChangePluginInputModeByModeL((TPluginInputMode)(iSharedData.PluginInputMode()),
                                             EPenInputOpenManually,
@@ -563,6 +577,8 @@
                 }
                 break;
             case ESignalLayoutClosed:
+            	// Enable transition effect when close pen ui by pressing close button.
+            	iPenInputServer.EnableGfxTransEffect( ETrue );
                 if(iPluginInputMode == EPluginInputModeItut)
                 	{
 					iFepMan.PtiEngine()->CancelTimerActivity();
@@ -1013,9 +1029,24 @@
             break;
         case EPluginResourceChanged:
             {
-			iOrientationChangedfromUI = ETrue;
-            OnResourceChangedL( aEventData );
-			iOrientationChangedfromUI = EFalse;
+            iOrientationChangedfromUI = ETrue;
+            
+            TUid uid = GetCurAppUid();
+            if ( IsAknNotifyServerApp( uid ) )
+                {
+                //turn off AutoForeground feature of global query temporarily during layout switching
+                //if not, global query may be shown on top of virtual input by unexpected tap events.
+                CCoeEnv::Static()->RootWin().AutoForeground( EFalse );
+                TRAPD( err, OnResourceChangedL( aEventData ) );
+                CCoeEnv::Static()->RootWin().AutoForeground( ETrue );
+                User::LeaveIfError( err );
+                }
+            else
+                {
+                OnResourceChangedL( aEventData );
+                }
+            
+            iOrientationChangedfromUI = EFalse;
             }
             break;
         case EPluginFaseSwap:
@@ -2824,7 +2855,11 @@
     	{
 		iCurrentPluginInputFepUI->HandleCommandL
 			(ECmdPenInputSendEditorTextAndCurPos, reinterpret_cast<TInt>(&icfData));
-		iFepMan.TryPopExactWordInICFL();
+		if ( icfData.iMidPos >= 0 )
+			{
+		    // icfData.iMidPos >= 0 means the text which will be sent to ICF is inline text.
+		    iFepMan.TryPopExactWordInICFL();
+			}		
     	}
 
     if ( secretEditor ) 
@@ -5949,7 +5984,8 @@
          } 
       
      TInt flags = editorState->Flags();         
-     return ( flags & EEikEdwinAvkonDisableCursor ) == EEikEdwinAvkonDisableCursor; 
+     return ( flags & EAknEditorFlagAvkonSecretEditor ) == EAknEditorFlagAvkonSecretEditor; 
+      
      } 
 
 // --------------------------------------------------------------------------- 
@@ -6102,6 +6138,16 @@
     TPtiTextCase caseCalculated = EPtiCaseLower;
     TBuf<KDefaulCoreMaximumWordLength> mappedCharacters; 
     TBool isMappingFound = EFalse;
+    TPtiEngineInputMode oldInputMode = iFepMan.PtiEngine()->InputMode();
+    if ( oldInputMode != EPtiEngineQwertyPredictive ) 
+		{
+        // if current input mode isn't EPtiEngineQwertyPredictive, 
+        // change it to EPtiEngineQwertyPredictive temporarily, 
+        // so that during the process of searching in qwerty keymapping afterward, 
+        // qwerty keymapping can be gained.
+        iFepMan.PtiEngine()->SetInputMode( EPtiEngineQwertyPredictive );
+		}
+
     TPtiKey key = iFepMan.PtiEngine()->CharacterToKey( aCharacter );
 
     //It loops through all the key mappings to find the character in the key mappings and
@@ -6124,6 +6170,15 @@
         	break;
         	}
         }
+    
+    if ( oldInputMode != EPtiEngineQwertyPredictive ) 
+    	{
+        // if current input mode isn't EPtiEngineQwertyPredictive, 
+        // current input mode has been set to EPtiEngineQwertyPredictive temporarily before, 
+        // now we need to restore it,
+        // because state machine is responsible for changing it practically.
+        iFepMan.PtiEngine()->SetInputMode( oldInputMode );
+    	}
     //Now if there is no key mapping found for the character, then use the default TChar
     //APIs to find the case of the character.
     if( !isMappingFound )
--- a/fep/aknfep/src/AknFepUiInputStateEntryMiniQwertyZhuyinPhrase.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/fep/aknfep/src/AknFepUiInputStateEntryMiniQwertyZhuyinPhrase.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -515,8 +515,7 @@
 
     TBool ret = ETrue;
 
-    if ( (aKey == EPtiKeyQwertyE || aKey == EPtiKeyQwertyR || 
-        aKey == EPtiKeyQwertyY || aKey == EPtiKeyQwertyU || aKey == EStdKeySpace)
+    if ( (iOwner->IsQwertyZhuyinToneMarkKey(aKey)|| aKey == EStdKeySpace)
         && (aLength == EShortKeyPress) )
         {
         if ( keystrokeLength == 0 )
--- a/fep/aknfep/src/AknFepUiInputStateEntryQwertyWesternPredictive.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/fep/aknfep/src/AknFepUiInputStateEntryQwertyWesternPredictive.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -42,10 +42,12 @@
 #include <featmgr.h>                //FeatureManager
 #include <e32keys.h>
 #include <aknfep.rsg>
+#include <PtiKeyMappings.h>
 
 
 static const TInt KKeyMappingsLength = 63;
 
+
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 //
 TAknFepInputStateEntryQwertyWesternPredictive::
@@ -604,6 +606,72 @@
         // Framework will handle the key event.
        	return EFalse;
     }
+
+
+// use ptiengine's api to tell whether a character mapped on a given key.	
+TBool TAknFepInputStateEntryQwertyWesternPredictive::MapAgainst(TInt aKey, TInt aMode, TInt16 aAgainst, TInt aCase) const
+    {    
+    CPtiEngine* ptiengine = iOwner->PtiEngine();
+    if(ptiengine)
+        {
+        ptiengine->SetInputMode((TPtiEngineInputMode)aMode);
+        TBuf<KMaxName> data;
+        ptiengine->MappingDataForKey((TPtiKey)aKey, data, (TPtiTextCase)aCase);
+        if(data.Length() > 0)
+            {
+            return (data[0] == aAgainst);                
+            }
+        }
+    return EFalse;        
+    }
+	
+	
+// Get Scancode from a given character and tell the case at the same time.
+TInt TAknFepInputStateEntryQwertyWesternPredictive::ScanCodeForCharacter( TUint aChar, TPtiTextCase& aCase )
+    {
+    MAknFepManagerUIInterface* fepMan = iOwner->FepMan();
+    CPtiEngine* ptiengine = iOwner->PtiEngine();
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+    CPtiCoreLanguage *lang = static_cast<CPtiCoreLanguage*>( ptiengine->CurrentLanguage() );
+    MPtiKeyMappings* keymapping = lang->GetQwertyKeymappings();
+    if ( keymapping )
+        {
+        TPtiEngineInputMode oldInputMode = ptiengine->InputMode();
+        ptiengine->SetInputMode( EPtiEngineQwertyPredictive );
+        TInt retKey = keymapping->KeyForCharacter( (TUint16)aChar );
+        if(MapAgainst(retKey, EPtiEngineQwertyPredictive, aChar, EPtiCaseLower))
+            {
+            aCase = EPtiCaseLower;
+            }
+        else if(MapAgainst(retKey, EPtiEngineQwertyPredictive, aChar, EPtiCaseUpper))
+            {
+            aCase = EPtiCaseUpper;
+            }
+        else if(MapAgainst(retKey, EPtiEngineQwertyPredictive, aChar, EPtiCaseFnLower))
+            {
+            aCase = EPtiCaseFnLower;
+            }
+        else if(MapAgainst(retKey, EPtiEngineQwertyPredictive, aChar, EPtiCaseFnUpper))
+            {
+            aCase = EPtiCaseFnUpper;
+            }
+        else
+            {
+            }
+        ptiengine->SetInputMode( oldInputMode );
+#if defined(__WINS__)
+    if (retKey == EPtiKeyQwertyPlus)
+        {
+        retKey = EStdKeyNkpPlus;
+        }
+#endif
+        return retKey;
+        }
+    return EPtiKeyNone;
+#else
+    return EPtiKeyNone;
+#endif // RD_INTELLIGENT_TEXT_INPUT
+    }
     
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////
--- a/fep/aknfep/src/AknFepUiInputStateInitialChineseGenericQwerty.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/fep/aknfep/src/AknFepUiInputStateInitialChineseGenericQwerty.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -91,6 +91,33 @@
 #endif
     }
 
+TInt TAknFepInputStateInitialChineseGenericQwerty::ToneMark(TInt aKey, TDes& aResult)
+    {
+    CPtiEngine* ptiengine = iOwner->PtiEngine();
+    TInt number = 0;
+    aResult.Zero();
+    if(ptiengine)
+        {
+        TBuf<KMaxName> data;
+        ptiengine->MappingDataForKey((TPtiKey)aKey, data, EPtiCaseLower);
+        if(data.Length() > 0)
+            {
+            for(TInt i = 0; i < data.Length(); i++)
+                {
+                if(data[i] == KZhuyinTone2 || data[i] == KZhuyinTone3 || data[i] == KZhuyinTone4 || data[i] == KZhuyinTone5)
+                    {                   
+                    if(aResult.MaxLength() > i)
+                        {
+                    aResult.Append(data[i]);
+                    number++;                        
+                        }                                            
+                    }
+                }
+            }
+        }
+    return number;
+    }
+	
 TBool TAknFepInputStateInitialChineseGenericQwerty::HandleKeyL(TInt aKey, TKeyPressLength aLength)
     {
     CPtiEngine* ptiengine = iOwner->PtiEngine();
@@ -124,58 +151,14 @@
         && !fepMan->IsFlagSet(CAknFepManager::EFlagQwertyChrKeyDepressed))
         {
         TBuf<1> ToneMarkBuf;
-#ifdef RD_INTELLIGENT_TEXT_INPUT 
-        if( keyboardType == EPtiKeyboardQwerty4x12)
-            {
-#endif
-        switch(aKey)
-            {
-            case EPtiKeyQwerty3:
-                ToneMarkBuf.Append(KZhuyinTone3);
-                break;
+        if(ToneMark(aKey, ToneMarkBuf) > 0)
 
-            case EPtiKeyQwerty4:
-                ToneMarkBuf.Append(KZhuyinTone4);
-                break;
 
-            case EPtiKeyQwerty6:
-                ToneMarkBuf.Append(KZhuyinTone2);
-                break;
 
-            case EPtiKeyQwerty7:
-                ToneMarkBuf.Append(KZhuyinTone5);
-                break;
-            default:
-                break;
-            }
-#ifdef RD_INTELLIGENT_TEXT_INPUT 
-                }
-            else
-                if (keyboardType == EPtiKeyboardQwerty4x10 || keyboardType
-                        == EPtiKeyboardQwerty3x11)
                     {
-                    switch (aKey)
-                        {
-                        case EPtiKeyQwertyE:
-                            ToneMarkBuf.Append(KZhuyinTone3);
-                            break;
 
-                        case EPtiKeyQwertyR:
-                            ToneMarkBuf.Append(KZhuyinTone4);
-                            break;
 
-                        case EPtiKeyQwertyY:
-                            ToneMarkBuf.Append(KZhuyinTone2);
-                            break;
 
-                        case EPtiKeyQwertyU:
-                            ToneMarkBuf.Append(KZhuyinTone5);
-                            break;
-                        default:
-                            break;
-                        }
-                    }
-#endif
         
         MAknFepManagerUIInterface* fepMan = iOwner->FepMan();
         fepMan->NewCharacterL(ToneMarkBuf);
@@ -186,6 +169,7 @@
             iOwner->FepMan()->TryCloseUiL();
             }
         ret = ETrue;
+            }
         }
     else if(iOwner->IsValidChineseInputKeyQwerty(aKey) && 
             !fepMan->IsFlagSet(CAknFepManager::EFlagQwertyChrKeyDepressed) && 
@@ -336,10 +320,29 @@
     return response;
     }
 
+//--------------------------------------------------------------------------
+// The gate to decide whether it is a character is whether it has valid mapping
+// If return ETrue, the key will pass to ptiengine.
+//--------------------------------------------------------------------------
+//
 TBool TAknFepInputStateInitialChineseGenericQwerty::IsCharacter(TInt aKey)
     {
     TBool response = EFalse;
-    if (aKey >= EPtiKeyQwertyA && aKey <= EPtiKeyQwertyZ)
+    CPtiEngine* ptiengine = iOwner->PtiEngine(); 
+    MAknFepManagerUIInterface* fepMan = iOwner->FepMan();
+    TPtiTextCase textCase = EPtiCaseLower;
+    if (ptiengine && fepMan)
+        {
+        TBuf<KMaxName> data;
+        ptiengine->MappingDataForKey((TPtiKey)aKey, data, textCase);
+        if (data.Length() > 0)
+            {
+        response = ETrue;
+            }
+        }
+		
+	// exception Z might has no mapping but need to put into ptiengine.
+    if(!response && aKey == EPtiKeyQwertyZ)
         {
         response = ETrue;
         }
--- a/fep/aknfep/src/AknFepUiManagerBase.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/fep/aknfep/src/AknFepUiManagerBase.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -1023,4 +1023,18 @@
     return iFepMan->ZhuyinAnalyser();
     }
 
+TBool CAknFepUIManagerBase::MapAgainst(TInt aKey, TInt aMode, TInt16 aAgainst, TInt aCase) const
+    {
+    if(iPtiEngine)
+        {
+        iPtiEngine->SetInputMode((TPtiEngineInputMode)aMode);
+        TBuf<KMaxName> data;
+        iPtiEngine->MappingDataForKey((TPtiKey)aKey, data, (TPtiTextCase)aCase);
+        if(data.Length() > 0)
+            {
+            return (data[0] == aAgainst);                
+            }
+        }
+    return EFalse;
+    }
 // End of file
--- a/fep/aknfep/src/AknFepUiManagerChinese.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/fep/aknfep/src/AknFepUiManagerChinese.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -132,6 +132,14 @@
 const TInt16 KStrokeQuestionValue = 0x003f;
 const TInt16 KStrokeUnicode = 0x2461;
 const TInt16 KZhuyinIndicator = 0x2462;
+const TInt16 KPinyinIndicator = 0x2460;
+//const TInt16 KStrokeIndicator = 0x2461;
+const TInt16 KCanjieIndicator = 0x2463;
+const TInt16 KChineseTone1 = 0x02c9;
+const TInt16 KChineseTone2 = 0x02ca; 
+const TInt16 KChineseTone3 = 0x02c7; 
+const TInt16 KChineseTone4 = 0x02cb;
+const TInt16 KChineseTone0 = 0x02d9;
 /**
 *  CAknFepUIManagerChinese class.
 * 
@@ -475,6 +483,48 @@
     return EFalse;
     }
 #endif
+TBool CAknFepUIManagerChinese::IsValidChineseInputSymbol(TInt aKey, TPtiEngineInputMode aMode) const
+    {
+    if( aMode == EPtiEnginePinyinPhraseQwerty)
+        {
+        return MapAgainst(aKey, aMode, KPinyinIndicator, EPtiCaseLower);
+        }
+    else if( aMode == EPtiEngineZhuyinPhraseQwerty)
+        {
+        return MapAgainst(aKey, aMode, KZhuyinIndicator, EPtiCaseLower);
+        }
+    else if( aMode == EPtiEngineNormalCangjieQwerty || 
+             aMode == EPtiEngineEasyCangjieQwerty ||
+             aMode == EPtiEngineAdvCangjieQwerty)
+        {
+        return MapAgainst(aKey, aMode, KCanjieIndicator, EPtiCaseLower);
+        }
+    return EFalse;
+    }
+TBool CAknFepUIManagerChinese::IsValidChineseToneMarkKey(TInt aKey, TPtiEngineInputMode aMode) const
+    {
+    if( MapAgainst(aKey, aMode, KChineseTone1, EPtiCaseLower))
+        {
+        return ETrue;
+        }
+    else if( MapAgainst(aKey, aMode, KChineseTone2, EPtiCaseLower))
+        {
+        return ETrue;
+        }
+    else if( MapAgainst(aKey, aMode, KChineseTone3, EPtiCaseLower))
+        {
+        return ETrue;
+        }
+    else if( MapAgainst(aKey, aMode, KChineseTone4, EPtiCaseLower))
+        {
+        return ETrue;
+        }
+    else if( MapAgainst(aKey, aMode, KChineseTone0, EPtiCaseLower))
+        {
+        return ETrue;
+        }
+    return EFalse;
+    }
 // ---------------------------------------------------------------------------
 // CAknFepUIManagerChinese::IsValidChineseInputKeyQwerty
 // 
@@ -495,8 +545,7 @@
 
     if(iMode == EPinyin)
         {
-        if( (aKey >= EPtiKeyQwertyA && aKey <= EPtiKeyQwertyZ) ||
-        	(aKey >= EPtiKeyQwerty1 && aKey <= EPtiKeyQwerty9) ||
+        if( IsValidChineseInputSymbol(aKey, EPtiEnginePinyinPhraseQwerty) ||
             (IsFlagSet(ESupportPinyinPhrase) && aKey == EPtiKeyQwertyApostrophe 
              && State() != EInitial))
             {
@@ -602,37 +651,14 @@
     
     if(iMode == ECangJie)
         {
-        if (aKey >= EPtiKeyQwertyA && aKey <= EPtiKeyQwertyZ)
-            {
-            response = ETrue;
-            }
+        response = IsValidChineseInputSymbol(aKey, (TPtiEngineInputMode)iFepMan->CangJieMode());
         }
     
     if(iMode == EZhuyin || iMode == EZhuyinFind)
         {
 #ifdef RD_INTELLIGENT_TEXT_INPUT        
-        if(EPtiKeyboardQwerty4x10 == keyboardType ||
-           EPtiKeyboardQwerty3x11 == keyboardType )
-            {
-            TBuf<KMaxName> lowerdata;
-            iPtiEngine->MappingDataForKey((TPtiKey)aKey, lowerdata, EPtiCaseLower);
        //     TInt ZhuyinUnicodeCur =0;
-            for(TInt i=0;i<lowerdata.Length();i++)
-                {
-                if(lowerdata[i]==KZhuyinIndicator)
-                    {
-                response = ETrue;
-                }   
-                }
-            }
-        else if( EPtiKeyboardCustomQwerty == keyboardType)        
-            {
-			if((aKey >= EPtiKeyQwertyA && aKey <= EPtiKeyQwertyZ))
-    			{
-				response = ETrue;        
-    			}       	
-            }
-        else if (  EPtiKeyboardHalfQwerty == keyboardType )
+        if (  EPtiKeyboardHalfQwerty == keyboardType )
             {
             if((aKey >= EPtiKeyQwertyA && aKey <= EPtiKeyQwertyZ) || 
                     (aKey >= EPtiKey0 && aKey <= EPtiKey9) ||
@@ -644,13 +670,7 @@
         else
             {
 #endif
-        if((aKey >= EPtiKeyQwertyA && aKey <= EPtiKeyQwertyZ) ||
-            (aKey >= EPtiKeyQwerty0 && aKey <= EPtiKeyQwerty9)||
-            (aKey == EPtiKeyQwertySemicolon) ||
-            (aKey == EPtiKeyQwertyApostrophe) ||
-            (aKey == EPtiKeyQwertyComma) ||
-            (aKey == EPtiKeyQwertyFullstop) ||
-            (aKey == EPtiKeyQwertySlash))
+          if(IsValidChineseInputSymbol(aKey, (TPtiEngineInputMode)EPtiEngineZhuyinPhraseQwerty))
             {
             response = ETrue;        
             }
@@ -697,37 +717,13 @@
     if(iQwertyMode && (iMode == EZhuyin) && supportSCTToneMarks)
         {
 #ifdef RD_INTELLIGENT_TEXT_INPUT 
-        if( keyboardType == EPtiKeyboardQwerty4x12)
-            {
-#endif            
-            if(aKey == EPtiKeyQwerty3 || aKey == EPtiKeyQwerty4 || aKey == EPtiKeyQwerty6 || aKey == EPtiKeyQwerty7)
-                {
-                return ETrue;
-                }
-            else
-                {
-                return EFalse;
-                }
-#ifdef RD_INTELLIGENT_TEXT_INPUT 
-            }
-        else if( keyboardType == EPtiKeyboardQwerty4x10 || keyboardType == EPtiKeyboardQwerty3x11)
-            {
-            if(aKey == EPtiKeyQwertyE || aKey == EPtiKeyQwertyR || aKey == EPtiKeyQwertyY || aKey == EPtiKeyQwertyU)
-                {
-                return ETrue;
-                }
-            else
-                {
-                return EFalse;
-                }
-            }
+        return IsValidChineseToneMarkKey(aKey, EPtiEngineZhuyinPhraseQwerty);            
 #endif        
         }
     else 
         {
         return EFalse;
         }
-    return EFalse;
     }
 
 // ---------------------------------------------------------------------------
--- a/fep/aknfep/src/aknfepuiinputminiqwertypinyinphrasebase.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/fep/aknfep/src/aknfepuiinputminiqwertypinyinphrasebase.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -1307,6 +1307,26 @@
         }
     }
 
+//-------------------------------------------------------------------------------
+// Purpose: to adjust the scancode to make pinyin works
+// Pinyin symbol inheritantly accepts A-Z, any input out of this range will make it crash.
+// Add this function to turn some alienated scancode to A-Z.
+//
+//---------------------------------------------------------------------------
+//
+void TAknFepInputMiniQwertyPinyinPhraseBase::MapKey(TInt& aKey)
+    {    
+    if(iOwner && iOwner->PtiEngine())
+        {
+        iOwner->PtiEngine()->SetInputMode(EPtiEnginePinyinPhraseQwerty);
+        TBuf<KMaxName> upperdata;
+        iOwner->PtiEngine()->MappingDataForKey((TPtiKey)aKey, upperdata, EPtiCaseUpper);
+        if(upperdata.Length() > 0)
+            {
+            aKey = upperdata[0];
+            }
+        }
+    }
 // ---------------------------------------------------------------------------
 // TAknFepInputMiniQwertyPinyinPhraseBase::GetShowKeystroke
 //Handle horizontal navigation.
@@ -1315,10 +1335,12 @@
 void TAknFepInputMiniQwertyPinyinPhraseBase::GetShowKeystroke(TInt aKey,
     TDes& aKeystroke)
     {
+    TInt key = aKey;
+    MapKey(key);   
     TInt count = sizeof(StrokeMap )/sizeof(StrokeMap[0] );
     for (TInt i = 0; i < count; i++)
         {
-        if (aKey == StrokeMap[i].iKeyCode)
+        if (key == StrokeMap[i].iKeyCode)
             {
             aKeystroke.Append(StrokeMap[i].iValue);
             break;
@@ -1679,6 +1701,12 @@
         }
 
     GetShowKeystroke(aKey, keystroke);
+	
+	//Add this condition to avoid crash in case keystroke is empty.
+    if(keystroke.Length() == 0)
+        {
+        return EFalse;
+        }
     if ( index >= keystrokeArray->Count() )
         {
         keystrokeArray->AppendL(keystroke);
--- a/fep/aknfep/src/aknfepuiinputstateminiqwertyzhuyinphrase.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/fep/aknfep/src/aknfepuiinputstateminiqwertyzhuyinphrase.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -513,8 +513,7 @@
         fepMan->NewTextL( currentText );
         fepMan->CommitInlineEditL();
         }
-    UIContainer()->EditPaneWindow()->ResetAllArray();
-    UIContainer()->EditPaneWindow()->SetPhraseCreationFlag( EFalse );
+    
     if ( fepMan->IsFlagSet( CAknFepManager::EFlagEditorFull ) )
         {
         fepMan->ClearFlag( CAknFepManager::EFlagEditorFull );
@@ -539,6 +538,8 @@
 			}
 		AddPhraseToDB( phraseCreatedWithZhuYin );
         }
+    UIContainer()->EditPaneWindow()->ResetAllArray();
+    UIContainer()->EditPaneWindow()->SetPhraseCreationFlag( EFalse );
     fepMan->TryCloseUiL();
     }
 
--- a/inputmethods_plat/aknfep_settings_api/inc/AknFepInternalCRKeys.h	Wed Sep 01 12:23:33 2010 +0100
+++ b/inputmethods_plat/aknfep_settings_api/inc/AknFepInternalCRKeys.h	Tue Sep 14 21:59:06 2010 +0300
@@ -381,6 +381,46 @@
  */
 const TUint32 KAknFepLastUsedPortraitInput = 0x00000026;
 
+/**
+ * following keys are used for tap accuracy enhancement, default input mode
+ */
+const TUint32 KAknFepTapAccuracyDefaultButtonExtMargins         = 0x27;
+const TUint32 KAknFepTapAccuracyDefaultKeyCtrlExtMargins        = 0x28;
+const TUint32 KAknFepTapAccuracyDefaultPointerMoveMaxMovement   = 0x29;
+const TUint32 KAknFepTapAccuracyDefaultPointerMoveTimeout       = 0x2a;
+const TUint32 KAknFepTapAccuracyDefaultPointerUpMaxMovement     = 0x2b;
+const TUint32 KAknFepTapAccuracyDefaultPointerUpTimeout         = 0x2c;
+
+/**
+ * following keys are used for tap accuracy enhancement, FSQ
+ */
+const TUint32 KAknFepTapAccuracyFsqButtonExtMargins             = 0x2d;
+const TUint32 KAknFepTapAccuracyFsqKeyCtrlExtMargins            = 0x2e;
+const TUint32 KAknFepTapAccuracyFsqPointerMoveMaxMovement       = 0x2f;
+const TUint32 KAknFepTapAccuracyFsqPointerMoveTimeout           = 0x30;
+const TUint32 KAknFepTapAccuracyFsqPointerUpMaxMovement         = 0x31;
+const TUint32 KAknFepTapAccuracyFsqPointerUpTimeout             = 0x32;
+
+/**
+ * following keys are used for tap accuracy enhancement, Portrait FSQ
+ */
+const TUint32 KAknFepTapAccuracyPFsqButtonExtMargins            = 0x33;
+const TUint32 KAknFepTapAccuracyPFsqKeyCtrlExtMargins           = 0x34;
+const TUint32 KAknFepTapAccuracyPFsqPointerMoveMaxMovement      = 0x35;
+const TUint32 KAknFepTapAccuracyPFsqPointerMoveTimeout          = 0x36;
+const TUint32 KAknFepTapAccuracyPFsqPointerUpMaxMovement        = 0x37;
+const TUint32 KAknFepTapAccuracyPFsqPointerUpTimeout            = 0x38;
+
+/**
+ * following keys are used for tap accuracy enhancement, Finger HWR
+ */
+const TUint32 KAknFepTapAccuracyFhwrButtonExtMargins            = 0x39;
+const TUint32 KAknFepTapAccuracyFhwrKeyCtrlExtMargins           = 0x3a;
+const TUint32 KAknFepTapAccuracyFhwrPointerMoveMaxMovement      = 0x3b;
+const TUint32 KAknFepTapAccuracyFhwrPointerMoveTimeout          = 0x3c;
+const TUint32 KAknFepTapAccuracyFhwrPointerUpMaxMovement        = 0x3d;
+const TUint32 KAknFepTapAccuracyFhwrPointerUpTimeout            = 0x3e;
+
 #endif
 
 // End of file
--- a/inputmethods_plat/pen_input_server_api/inc/peninputclient.h	Wed Sep 01 12:23:33 2010 +0100
+++ b/inputmethods_plat/pen_input_server_api/inc/peninputclient.h	Tue Sep 14 21:59:06 2010 +0300
@@ -428,6 +428,7 @@
     IMPORT_C TInt ConnectAsyc(TRequestStatus& aStatus);
 	IMPORT_C void SetDataQueryPopped(TBool aFlag);
     IMPORT_C void EnablePriorityChangeOnOriChange(TBool aEnabled);
+    IMPORT_C void EnableGfxTransEffect( TBool aEnable );
 private:    // Data
     /**
      * The singleton client to the input server
--- a/inputmethods_plat/pen_input_server_api/inc/peninputcmd.h	Wed Sep 01 12:23:33 2010 +0100
+++ b/inputmethods_plat/pen_input_server_api/inc/peninputcmd.h	Tue Sep 14 21:59:06 2010 +0300
@@ -75,6 +75,7 @@
     EPeninputOpLastCommand ,
     EPeninputOpRequestDSAState,
 	EPeninputOpChangeFeedbackType,
+	EPeninputOpUpdatePointerSuppressor,
     EPeninputUserCmdBase = 1000
 
     };
@@ -112,6 +113,7 @@
     ESignalDisableUpdating,
     ESignalDrawBackground,
     ESignalEnableLayoutRedrawWhenActive,
+    ESignalUpdatePointerSuppressor,
     ESignalFepEventBase = 1500,    //Event base for Fep. All fep event
                                     //is re-directed to Fep.
     ESignalKeyEvent = 1501,        //hwr recongition selection event.
--- a/textinput/peninputarc/bwins/peninputClientU.DEF	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/bwins/peninputClientU.DEF	Tue Sep 14 21:59:06 2010 +0300
@@ -64,4 +64,5 @@
 	?ConnectAsyc@RPeninputServer@@QAEHAAVTRequestStatus@@@Z @ 63 NONAME ; int RPeninputServer::ConnectAsyc(class TRequestStatus &)
 	?SetDataQueryPopped@RPeninputServer@@QAEXH@Z @ 64 NONAME ; void RPeninputServer::SetDataQueryPopped(int)
 	?EnablePriorityChangeOnOriChange@RPeninputServer@@QAEXH@Z @ 65 NONAME ; void RPeninputServer::EnablePriorityChangeOnOriChange(int)
+        ?EnableGfxTransEffect@RPeninputServer@@QAEXH@Z @ 66 NONAME ; void RPeninputServer::EnableGfxTransEffect(int)
 
--- a/textinput/peninputarc/eabi/peninputClientU.DEF	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/eabi/peninputClientU.DEF	Tue Sep 14 21:59:06 2010 +0300
@@ -73,4 +73,5 @@
 	_ZN15RPeninputServer11ConnectAsycER14TRequestStatus @ 72 NONAME
 	_ZN15RPeninputServer18SetDataQueryPoppedEi @ 73 NONAME
 	_ZN15RPeninputServer31EnablePriorityChangeOnOriChangeEi @ 74 NONAME
+	_ZN15RPeninputServer20EnableGfxTransEffectEi @ 75 NONAME
 
--- a/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayout.h	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputlayout.h	Tue Sep 14 21:59:06 2010 +0300
@@ -564,6 +564,22 @@
      */
     inline MTouchFeedback* TouchFeedbackInstance();
 
+    /**
+     * Get extra response area of virtual key controls.
+     * 
+     * @since Symbian^3
+     * @param aMargins output the margins around the original response area.
+     */
+    void GetKeyExtResponseArea( TMargins& aMargins );
+
+    /**
+     * Get extra response area of button controls.
+     * 
+     * @since Symbian^3
+     * @param aMargins  output the margins around the original response area.
+     */    
+    void GetButtonExtResponseArea( TMargins& aMargins );
+
 protected:
     /**
      * Constructor
@@ -631,6 +647,14 @@
     void SendEditorTextAndCursorPosL(TUint8* aData);
 	void SetSelfBmpDeviceFlag(TBool aFlag);
 
+    /**
+     * Load tap accuracy enhancement settings according to the specified input mode.
+     *  
+     * @since Symbian^3
+     * @param alayoutType specifies the input mode(refer to TPluginInputMode) of this layout.
+     */
+    void LoadTapAccuracySettingsL( TInt alayoutType );
+
 private:
     NONSHARABLE_CLASS( CFepUiLayoutExt) : public CBase
         {
@@ -648,7 +672,39 @@
 			MTouchFeedback*   iTouchFeedbackInstance;    
             
 			TBool iSelfBmpDeviceFlag;
-            TBool iDisableDrawing;   
+            TBool iDisableDrawing;
+            
+            /**
+             * PointerMove event suppressor parameter: max movement(in pixel)
+             */
+            TSize iPointerMoveSuppressMaxMovement;
+            
+            /**
+             * PointerMove event suppressor parameter: timeout(in microsecond)
+             */
+            TInt iPointerMoveSuppressTimeout;
+
+            /**
+             * PointerUp event suppressor parameter: max movement(in pixel)
+             */
+            TSize iPointerUpSuppressMaxMovement;
+            
+            /**
+             * PointerUp event suppressor parameter: timeout(in microsecond)
+             */
+            TInt iPointerUpSuppressTimeout;
+            
+            /**
+             * extra response area of virtual key controls
+             */
+            TMargins iKeyExtResponseMargins;
+            
+            /**
+             * extra response area of virtual button controls
+             */
+            TMargins iButtonExtResponseMargins;
+
+            
         };
  
 private:  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/textinput/peninputarc/inc/peninputlayoutcontrolinc/peninputtapsettingmanager.h	Tue Sep 14 21:59:06 2010 +0300
@@ -0,0 +1,203 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  header file of peninput ui layout
+*
+*/
+
+
+#ifndef PENINPUTTAPSETTINGMANAGER_H
+#define PENINPUTTAPSETTINGMANAGER_H
+
+#include <e32cmn.h>
+#include <e32base.h>
+#include <gdi.h>
+
+NONSHARABLE_CLASS(CPeninputTapSettingManager) : public CBase
+    {
+public: //constructors
+    /**
+     * Symbian constructor.
+     * 
+     * @since Symbian^3
+     * @return Pointer to created object
+     */
+    static CPeninputTapSettingManager* NewL();
+
+    /**
+     * Symbian constructor.
+     * 
+     * @since Symbian^3
+     * @return Pointer to created object
+     */
+    static CPeninputTapSettingManager* NewLC();
+    
+    /*
+     * Standard c++ destructor.
+     * @since Symbian^3
+     */
+    virtual ~CPeninputTapSettingManager();
+
+public:
+    /**
+     * Load all parameters of tap accuracy enhancement for specified layout.
+     * 
+     * @since Symbian^3
+     * @param aLayoutType layout type, refer to TPluginInputMode
+     * @return none
+     */
+    void Load( TInt aLayoutType );
+    
+    /**
+     * Load all parameters of tap accuracy enhancement for specified layout.
+     * 
+     * @since Symbian^3
+     * @param aLayoutType layout type, refer to TPluginInputMode
+     * @param aFileName path name of configuration file
+     * @return none
+     */
+    void Load( TInt aLayoutType, const TDesC& aFileName );
+    
+    /**
+     * Get configuration of PointerMove event suppressor.
+     * 
+     * @since Symbian^3
+     * @param aMaxMovement output max movement of PointerMove event
+     * @param aTimeout output timeout(in microsecond) of PointerMove event
+     * @return none
+     */
+    void GetPointerMoveSuppressor( TSize& aMaxMovement, TInt& aTimeout );
+    
+    /**
+     * Get configuration of PointerUp event suppressor.
+     * 
+     * @since Symbian^3
+     * @param aMaxMovement output max movement of PointerUp event
+     * @param aTimeout output timeout(in microsecond) of PointerUp event
+     * @return none
+     */
+    void GetPointerUpSuppressor( TSize& aMaxMovement, TInt& aTimeout );
+    
+    /**
+     * Get extra response area of virtual key controls.
+     * 
+     * @since Symbian^3
+     * @param aMargins output the margins around the original response area.
+     * @return none
+     */
+    void GetKeyExtResponseArea( TMargins& aMargins );
+    
+    /**
+     * Get extra response area of button controls.
+     * 
+     * @since Symbian^3
+     * @param aMargins output the margins around the original response area.
+     * @return none
+     */
+    void GetButtonExtResponseArea( TMargins& aMargins );
+
+private:
+    /**
+     * C++ constructor
+     * 
+     * @since Symbian^3
+     * @return None
+     */
+    CPeninputTapSettingManager();
+    
+    /**
+     * Symbian second-phase constructor
+     *
+     * @since Symbian^3
+     * @return None
+     */ 
+    void ConstructL();
+private:
+    /**
+     * Load all parameters of tap accuracy enhancement for specified layout.
+     * 
+     * @since Symbian^3
+     * @param aLayoutType layout type, refer to TPluginInputMode
+     * @return none
+     */
+    void LoadFromRepositoryL( TInt aLayoutType );
+    
+    /**
+     * Load all parameters of tap accuracy enhancement for specified layout
+     * 
+     * @since Symbian^3
+     * @param aLayoutType layout type, refer to TPluginInputMode
+     * @param aFileName path name of configuration file
+     * @return none
+     */
+    void LoadFromFileL( TInt aLayoutType, const TDesC& aFileName );
+    
+    /**
+     * Load default parameters
+     * 
+     * @since Symbian^3
+     * @return none
+     */
+    void LoadDefault();
+    
+    /**
+     * parse a TPoint from a comma separated values string.
+     * 
+     * @since Symbian^3
+     * @return number of values in aText
+     */
+    TInt ParsePoints( TPoint& aPoint, const TDesC& aText );
+    
+    /**
+     * parse a TMargins from a comma separated values string.
+     * 
+     * @since Symbian^3
+     * @param aMargins output parse result
+     * @param aText source string
+     * @return number of values in aText
+     */
+    TInt ParseMargins( TMargins& aMargins, const TDesC& aText ); 
+    
+private:
+    /**
+     * max movement of PointerMove event
+     */
+    TSize iPointerMoveMaxMovement;
+    
+    /**
+     * timeout of PointerMove event, microsecond
+     */
+    TInt  iPointerMoveTimeout;
+    
+    /**
+     * max movement of PointerUp event
+     */
+    TSize iPointerUpMaxMovement;
+    
+    /**
+     * timeout of PointerUp event, microsecond
+     */
+    TInt  iPointerUpTimeout;
+    
+    /**
+     * extra response area of virtual key controls
+     */
+    TMargins iKeyMargins;
+    
+    /**
+     * extra response area of button controls
+     */
+    TMargins iButtonMargins;
+    };
+
+#endif // PENINPUTTAPSETTINGMANAGER_H
--- a/textinput/peninputarc/inc/pensrvcliinc/peninputanimclientobj.h	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/inc/pensrvcliinc/peninputanimclientobj.h	Tue Sep 14 21:59:06 2010 +0300
@@ -231,6 +231,16 @@
      * @return ETrue if command added successfully.
      */	    
     TBool SetDiscreetPopArea(const TRect& aArea);
+    
+    /**
+     * Update parameters of pointer event suppressor.
+     * 
+     * @since Symbian^3
+     * @param aParameters parameters of pointer event suppressor
+     * @return none
+     */
+    void UpdatePointerEventSuppressor( const TPointerEventSuppressorParameters& aParameters );
+
 private:
     /**
      * Default constructor.
--- a/textinput/peninputarc/inc/pensrvcliinc/peninputanimcommand.h	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/inc/pensrvcliinc/peninputanimcommand.h	Tue Sep 14 21:59:06 2010 +0300
@@ -494,6 +494,37 @@
 private:
     TRect iArea;    
     };
+
+//class TAnimUpdatePointerEventSuppressorCmd
+/**
+ * Class for handling pointer event suppressor command
+ * 
+ *
+ * @since Symbian^3
+ */
+class TAnimUpdatePointerEventSuppressorCmd :  public TAnimCmd
+    {
+public:
+    /**
+     * Default constructor
+     * @param aAnim The animation cliet which executes the command     
+     * @param aParameters parameters of pointer event suppressor
+     */
+    TAnimUpdatePointerEventSuppressorCmd( RPeninputAnim& aAnim, 
+                         const TPointerEventSuppressorParameters& aParameters );
+    
+    /**
+     * Execute the command
+     *
+     * @since Symbian^3
+     * @return ETrue if command has been executed successfully.     
+     */ 
+    virtual TBool ExecuteAnimCommand() const;
+    
+private:
+    TPointerEventSuppressorParameters iParameters;
+    };
+
 #include "peninputanimcommand.inl"
 	
 #endif //C_CPENINPUTANIM_CMD_H
--- a/textinput/peninputarc/inc/pensrvcliinc/peninputclientimpl.h	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/inc/pensrvcliinc/peninputclientimpl.h	Tue Sep 14 21:59:06 2010 +0300
@@ -468,6 +468,15 @@
     TBool ServerReady();
     void OnServerStarted(TInt aErr);
     
+    /**
+     * Enable or disable transition effect.
+     * 
+     * @since Symbian^3
+     * @param aEnable, ETrue: enable transition effect
+     *                 EFalse: disable transition effect.     
+     */
+    void EnableGfxTransEffect( TBool aEnable );
+    
 private:
         /**
      * Constructor
--- a/textinput/peninputarc/inc/pensrvcliinc/peninputclientserver.h	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/inc/pensrvcliinc/peninputclientserver.h	Tue Sep 14 21:59:06 2010 +0300
@@ -89,7 +89,8 @@
     EPeninputRequestDimResChangeLayout,
     EPeninputRequestSupportInputMode,
     EPeninputRequestSetInputLanguage,
-	EPeninputEnablePriorityChangeOnOriChange
+	EPeninputEnablePriorityChangeOnOriChange,
+	EPeninputRequestEnableGfxTransEffect
     };
 
 //server error code
--- a/textinput/peninputarc/inc/pensrvcliinc/peninputcmdparamext.h	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/inc/pensrvcliinc/peninputcmdparamext.h	Tue Sep 14 21:59:06 2010 +0300
@@ -45,4 +45,19 @@
     // see MAnimSpriteFunctions::UpdateMember
     TBool iFullUpdateFlag;
     };
+
+/**
+ * parameters for pointer event suppressor
+ */
+struct TPointerEventSuppressorParameters
+    {
+    TBool iMoveEventSuppressEnabled;
+    TSize iMoveEventMaxMovement;
+    TInt  iMoveEventTimeout;
+    
+    TBool iUpEventSuppressEnabled;
+    TSize iUpEventMaxMovement;
+    TInt  iUpEventTimeout;
+    };
+
 #endif //_PENINPUTPARAM_EXT_H
--- a/textinput/peninputarc/inc/pensrvcliinc/peninputserver.h	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/inc/pensrvcliinc/peninputserver.h	Tue Sep 14 21:59:06 2010 +0300
@@ -693,6 +693,15 @@
     void CheckSessionValidL(CPeninputServerSession* aSession1,
                             CPeninputServerSession* aSession2) const;
     
+    /**
+     * Update parameters of pointer event suppressor.
+     * 
+     * @since Symbian^3
+     * @param aData parameters of pointer event suppressor
+     * @return none
+     */
+    void UpdatePointerEventSuppressor( const TDesC& aData );
+    
 public:    
     TInt DisabledByDSA(); 
     TInt DisabledByDSAFromAnim();   
--- a/textinput/peninputarc/inc/pensrvcliinc/penpointereventsuppressor.h	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/inc/pensrvcliinc/penpointereventsuppressor.h	Tue Sep 14 21:59:06 2010 +0300
@@ -85,7 +85,9 @@
 	* @param aPointerEvent the pointer event which may need to be suppressed.
 	* @return ETrue if the pointer event should be suppressed, or EFalse if it should be handled.
 	*/
-	TBool SuppressPointerEvent(const TPointerEvent& aPointerEvent);
+
+    TBool SuppressPointerEvent( TPointerEvent& aPointerEvent );
+
 	/**
 	* Set the maximum time period that drag events should be
 	* ignored during a pointer interaction.
@@ -109,6 +111,24 @@
 	*/
 	void SetMinInterDragInterval(TTimeIntervalMicroSeconds aInterval);
 
+    /**
+     * Set the maximum pointer movement for up events.
+     * All up events within maximum movement and timeout are moved to the down position.
+     * 
+     * @since Symbian^3
+     * @param aMaxDownUpMove maximum movement(in pixel) of up event
+     */
+    void SetMaxDownUpMove( TSize aMaxDownUpMove );
+
+    /**
+     * Set the maximum time between up and down events.
+     * All up events within maximum movement and timeout are moved to the down position.
+     * 
+     * @since Symbian^3
+     * @param aDuration time between down and up events. 
+     */
+    void SetMaxDownUpDuration( TTimeIntervalMicroSeconds aDuration );
+
 private:
 	CPenPointerEventSuppressor();
 
@@ -120,6 +140,19 @@
 	TPoint iDownPos;
 	TBool iTap;
 	TTime iLastEventTime;
-	};
+	
+
+    /**
+     * The maximum pointer movement for up events.
+     * All up events within maximum movement and timeout are moved to the down position.
+     */
+    TSize iMaxDownUpMove;
+
+    /**
+     * The maximum time between up and down events.
+     * All up events within maximum movement and timeout are moved to the down position.
+     */
+    TTimeIntervalMicroSeconds iMaxDownUpDuration;
+    };
 
 #endif
--- a/textinput/peninputarc/inc/pensrvcliinc/penuiwndctrl.h	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/inc/pensrvcliinc/penuiwndctrl.h	Tue Sep 14 21:59:06 2010 +0300
@@ -241,6 +241,18 @@
      */
     void SetCursorColor();
     
+   /**
+    * Enable or disable transition effect.
+    * 
+    * @since Symbian^3
+    * @param aEnableGfxTransEffect, ETrue: enable transition effect
+    *                               EFalse: disable transition effect.
+    */
+    inline void EnableGfxTransEffect( TBool aEnableGfxTransEffect )
+    	{
+    	iEnableGfxTransEffect = aEnableGfxTransEffect;
+    	};
+    
 public: // Functions from base classes.
 
     /**
@@ -385,6 +397,12 @@
      */
     TRgb iCursorColor;
     
+    
+   /**
+    * If transition effect is enabled. 
+    */
+    TBool iEnableGfxTransEffect;
+
 friend class CCursorWindow;
     };
 class CInternalBkCtrl : public CCoeControl
--- a/textinput/peninputarc/inc/pensrvcliinc/rpeninputanim.h	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/inc/pensrvcliinc/rpeninputanim.h	Tue Sep 14 21:59:06 2010 +0300
@@ -186,6 +186,16 @@
     void GetDSAState(TBool& aState);
 	
     void SetDiscreeptPop(const TRect& aArea);
+    
+    /**
+     * Update parameters of pointer event suppressor.
+     * 
+     * @since Symbian^3
+     * @param aParameters parameters of pointer event suppressor
+     * @return none
+     */
+    void UpdatePointerEventSuppressor( const TPointerEventSuppressorParameters& aParameters );
+
 private:
 
     /**
--- a/textinput/peninputarc/src/peninputanim/peninputanim.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/src/peninputanim/peninputanim.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -241,6 +241,7 @@
         case TRawEvent::EButton1Up:
             {
             pointerEvent.iType = TPointerEvent::EButton1Up;
+            pointerEvent.iPosition = aRawEvent.Pos();
             break;
             }
         case TRawEvent::EPointerMove:
@@ -259,17 +260,25 @@
         return ETrue;
         }
 
+    TRawEvent rawEvent = aRawEvent;
+    if ( aRawEvent.Type() == TRawEvent::EButton1Up 
+         && aRawEvent.Pos() != pointerEvent.iPosition )
+        {
+        rawEvent.Set( TRawEvent::EButton1Up, 
+                      pointerEvent.iPosition.iX, 
+                      pointerEvent.iPosition.iY );
+        }
     
     switch(aRawEvent.Type())
         {
         case TRawEvent::EKeyUp:
         case TRawEvent::EKeyDown:
             {
-            return OnRawKeyEvent(aRawEvent);            
+            return OnRawKeyEvent( rawEvent );            
             }
         case TRawEvent::EButton1Down:
             {
-            TBool used = OnRawButton1Down(aRawEvent);
+            TBool used = OnRawButton1Down( rawEvent );
             
             if ( used )
                 {
@@ -280,19 +289,19 @@
             }
         case TRawEvent::EButton1Up:
             {
-            TBool used = OnRawButton1Up(aRawEvent);
+            TBool used = OnRawButton1Up( rawEvent );
             StopTimer();
             return used;
             }
         case TRawEvent::EPointerMove:
             {
-            return OnRawPointerMove(aRawEvent);
+            return OnRawPointerMove( rawEvent );
             }
         default:
             {
             return EFalse;
-            }            
-        }    
+            }
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -695,6 +704,18 @@
             SetDiscreeptPop(area); 
             }
             break;
+        case EPeninputOpUpdatePointerSuppressor:
+            {
+            TPointerEventSuppressorParameters parameters;
+            TPckg<TPointerEventSuppressorParameters> msgData( parameters );
+            msg->ReadL( KMsgSlot1, msgData );
+            
+            iPointerEventSuppressor->SetMaxTapMove( parameters.iMoveEventMaxMovement );
+            iPointerEventSuppressor->SetMaxTapDuration( parameters.iMoveEventTimeout );
+            iPointerEventSuppressor->SetMaxDownUpMove( parameters.iUpEventMaxMovement );
+            iPointerEventSuppressor->SetMaxDownUpDuration( parameters.iUpEventTimeout );
+            }
+            break;
         default:
             // unsupported opcode, panic the client
             {                
--- a/textinput/peninputarc/src/peninputanim/penpointereventsuppressor.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/src/peninputanim/penpointereventsuppressor.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -21,6 +21,9 @@
 const TInt KPenPointerEventSuppressorDefaultMinInterDragInterval = 0;
 const TInt KPenPointerEventSuppressorDefaultMovement = 6;
 
+const TInt KPenPointerEventSuppressorDefaultMaxDownUpDuration = 400000; // 0.4 seconds
+const TInt KPenPointerEventSuppressorDefaultDownUpMovement = 7;
+
 CPenPointerEventSuppressor* CPenPointerEventSuppressor::NewL()
 	{
 	return new (ELeave) CPenPointerEventSuppressor;
@@ -32,17 +35,20 @@
 	}
 
 CPenPointerEventSuppressor::CPenPointerEventSuppressor()
-: iMaxTapDuration(KPenPointerEventSuppressorDefaultMaxTapDuration),
-  iMinInterDragInterval(KPenPointerEventSuppressorDefaultMinInterDragInterval),
-  iTap(EFalse)
+: iMaxTapDuration( KPenPointerEventSuppressorDefaultMaxTapDuration ),
+  iMinInterDragInterval( KPenPointerEventSuppressorDefaultMinInterDragInterval ),
+  iTap( EFalse ),
+  iMaxDownUpDuration( KPenPointerEventSuppressorDefaultMaxDownUpDuration )
   	{
   	// default move limit is 6 units, which seems to be a forgiving value for finger touch
   	iMaxTapMove.iWidth = KPenPointerEventSuppressorDefaultMovement;
 	iMaxTapMove.iHeight = KPenPointerEventSuppressorDefaultMovement;
+	
+	iMaxDownUpMove.iWidth = KPenPointerEventSuppressorDefaultDownUpMovement;
+	iMaxDownUpMove.iHeight = KPenPointerEventSuppressorDefaultDownUpMovement;
   	}
 
-TBool CPenPointerEventSuppressor::SuppressPointerEvent(
-        const TPointerEvent& aPointerEvent)
+TBool CPenPointerEventSuppressor::SuppressPointerEvent( TPointerEvent& aPointerEvent )
 	{
 	switch ( aPointerEvent.iType )
 		{
@@ -88,7 +94,17 @@
 			break;
 			}
 		case TPointerEvent::EButton1Up:
-		    {
+            {
+            TTime now;
+            now.HomeTime();
+            TPoint delta = aPointerEvent.iPosition - iDownPos;
+            if ( now.MicroSecondsFrom( iDownTime ) < iMaxDownUpDuration 
+                 && Abs( delta.iX ) < iMaxDownUpMove.iWidth 
+                 && Abs( delta.iY ) < iMaxDownUpMove.iHeight )
+                {
+                //within maximum movement and timeout, so move to position of down
+                aPointerEvent.iPosition = iDownPos;
+                }
 			iTap = EFalse;
 			break;
 		    }
@@ -118,3 +134,13 @@
 	{
 	iMinInterDragInterval = aInterval;
 	}
+
+void CPenPointerEventSuppressor::SetMaxDownUpMove( TSize aMaxDownUpMove ) 
+    { 
+    iMaxDownUpMove = aMaxDownUpMove; 
+    }
+
+void CPenPointerEventSuppressor::SetMaxDownUpDuration( TTimeIntervalMicroSeconds aDuration ) 
+    {
+    iMaxDownUpDuration = aDuration; 
+    }
--- a/textinput/peninputarc/src/peninputclient/penclientimpl.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/src/peninputclient/penclientimpl.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -1542,6 +1542,18 @@
     User::RequestComplete(iPendingRequest, aErr);
     }
 
+// ---------------------------------------------------------------------------
+// Enable or disable transition effect.
+// ---------------------------------------------------------------------------
+//
+void RPeninputServerImpl::EnableGfxTransEffect( TBool aEnable)
+    {
+    TPckg<TBool> msg( aEnable );
+    TIpcArgs arg;
+    arg.Set( KMsgSlot0, &msg );    
+    SendReceive(EPeninputRequestEnableGfxTransEffect, arg );  
+    }
+
 CWaitingServerAo::CWaitingServerAo(RPeninputServerImpl* aClient) 
                 : CActive(CActive::EPriorityStandard),
                   iClient(aClient)
--- a/textinput/peninputarc/src/peninputclient/peninputclient.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/src/peninputclient/peninputclient.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -509,5 +509,18 @@
     {
 	iSingletonServer->EnablePriorityChangeOnOriChange(aEnabled);
 	}	
+
+// ---------------------------------------------------------------------------
+// Enable or disable transition effect.
+// ---------------------------------------------------------------------------
+//  
+EXPORT_C void RPeninputServer::EnableGfxTransEffect( TBool aEnable )
+    {
+    if ( iSingletonServer )
+        {
+        iSingletonServer->EnableGfxTransEffect( aEnable );
+        }
+    }
+
 //end of class RPeninputServer
 // End of File
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbutton.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutbutton.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -59,9 +59,13 @@
     CFepUiBaseCtrl::BaseConstructL();
     
     //tap accuracy enhancement
-    if( FeatureManager::FeatureSupported( KFeatureIdFfCapacitiveDisplay ))
+    if ( FeatureManager::FeatureSupported( KFeatureIdFfCapacitiveDisplay ) )
         {
-        EnableExtResponseArea( ETrue, TRect(TPoint(10,10),TSize(10,10)) );
+        TMargins margins;
+        UiLayout()->GetButtonExtResponseArea( margins );
+        TPoint topLeftMargin( margins.iLeft, margins.iTop );
+        TSize bottomRightMargin( margins.iRight, margins.iBottom );
+        EnableExtResponseArea( ETrue, TRect( topLeftMargin,bottomRightMargin ) );
         }
     }
 
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutcontrol.mmp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutcontrol.mmp	Tue Sep 14 21:59:06 2010 +0300
@@ -58,6 +58,7 @@
 SOURCE                  peninputfloatctrl.cpp 
 SOURCE                  peninputfloatbubble.cpp 
 SOURCE                  peninputaknvkbpreviewbubblerenderer.cpp
+SOURCE                  peninputtapsettingmanager.cpp
 
 userinclude             ../../inc/peninputlayoutcontrolinc
 
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutvkbkeyctrl.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputlayoutvkbkeyctrl.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -106,9 +106,13 @@
     BaseConstructL();
     
     //tap accuracy enhancement
-    if( FeatureManager::FeatureSupported( KFeatureIdFfCapacitiveDisplay ))
+    if ( FeatureManager::FeatureSupported( KFeatureIdFfCapacitiveDisplay ))
         {
-        EnableExtResponseArea( ETrue, TRect(TPoint(10,10),TSize(10,10)) );
+        TMargins margins;
+        UiLayout()->GetKeyExtResponseArea( margins );
+        TPoint topLeftMargin( margins.iLeft, margins.iTop );
+        TSize bottomRightMargin( margins.iRight, margins.iBottom );
+        EnableExtResponseArea( ETrue, TRect( topLeftMargin,bottomRightMargin ) );
         }
     }
 
@@ -155,10 +159,29 @@
 				else if(iKeyboard->StarIcon() &&
 						iKeyInfo->KeyUnicodes(TVirtualKeyTextPos(i)) == KKeyStarCharacter )
 					{
-					//CFbsBitGc* gc = static_cast<CFbsBitGc*>(BitGc());
+					// Get the size of the icon
+					TSize starIconSize = iKeyboard->StarIcon()->Bitmap()->SizeInPixels();
+					// Get the rect of draw icon area
+					TRect drawIconRect = textLayout.TextRect();
+					// When the size of icon is different with the size of draw icon area,
+					// because the icon is drew from the left top coordinate of the draw
+					// icon area, so the icon will not be drew in the center. In this case,
+					// we need to adjust the top left coordinate of draw icon rect to 
+					// make sure that the icon will be drew in the center of the key
+					if ( starIconSize != drawIconRect.Size())
+                        {
+						// Adjust the top left coordinate of draw icon rect to make sure
+						// that the icon will be drew in the center of the key
+						drawIconRect.iTl.iX += 
+							( drawIconRect.Width() -  starIconSize.iWidth ) / 2;
+						drawIconRect.iTl.iY += 
+							( drawIconRect.Height() - starIconSize.iHeight ) / 2;
+                        }
+                
+					// Draw the icon
 					AknPenInputDrawUtils::DrawColorIcon( iKeyboard->StarIcon(),
 														 *aGc,
-														 textLayout.TextRect() );		
+														 drawIconRect );		
 					}
 				else				    
 				    {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputtapsettingmanager.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -0,0 +1,385 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Implementation for CFepUiLayout
+*
+*/
+
+
+#include "peninputtapsettingmanager.h"
+
+#include <centralrepository.h>
+#include <AknFepGlobalEnums.h>
+#include <AknFepInternalCRKeys.h>
+
+_LIT( KSeparatorComma, "," );
+
+const TInt KTextBufferLength = 128;
+
+const TInt KDefaultMovement = 5;
+const TInt KDefaultTimeout = 200000;
+const TInt KDefaultMargin = 9;
+
+// ---------------------------------------------------------------------------
+//  Symbian Constructor
+// ---------------------------------------------------------------------------
+// 
+CPeninputTapSettingManager* CPeninputTapSettingManager::NewL()
+    {
+    CPeninputTapSettingManager* self = CPeninputTapSettingManager::NewLC();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+//  Symbian Constructor
+// ---------------------------------------------------------------------------
+// 
+CPeninputTapSettingManager* CPeninputTapSettingManager::NewLC()
+    {
+    CPeninputTapSettingManager* self = new ( ELeave ) CPeninputTapSettingManager();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+//  c++ destructor
+// ---------------------------------------------------------------------------
+// 
+CPeninputTapSettingManager::~CPeninputTapSettingManager()
+    {
+
+    }
+
+// ---------------------------------------------------------------------------
+// Load all parameters of tap accuracy enhancement for specified layout
+// ---------------------------------------------------------------------------
+// 
+void CPeninputTapSettingManager::Load( TInt aLayoutType )
+    {
+    TRAPD( err, LoadFromRepositoryL( aLayoutType ) );
+    if ( err != KErrNone )
+        {
+        LoadDefault();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Load all parameters of tap accuracy enhancement for specified layout
+// ---------------------------------------------------------------------------
+//
+void CPeninputTapSettingManager::Load( TInt aLayoutType, const TDesC& aFileName )
+    {
+    TRAPD( err, LoadFromFileL( aLayoutType, aFileName ) );
+    if ( err != KErrNone )
+        {
+        LoadDefault();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Get configuration of PointerMove event suppressor
+// ---------------------------------------------------------------------------
+//
+void CPeninputTapSettingManager::GetPointerMoveSuppressor( TSize& aMaxMovement, 
+                                                           TInt& aTimeout )
+    {
+    aMaxMovement = iPointerMoveMaxMovement;
+    aTimeout = iPointerMoveTimeout; 
+    }
+
+// ---------------------------------------------------------------------------
+// Get configuration of PointerUp event suppressor
+// ---------------------------------------------------------------------------
+//
+void CPeninputTapSettingManager::GetPointerUpSuppressor( TSize& aMaxMovement, 
+                                                         TInt& aTimeout )
+    {
+    aMaxMovement = iPointerUpMaxMovement;
+    aTimeout = iPointerUpTimeout;
+    }
+
+// ---------------------------------------------------------------------------
+// Get extra response area of virtual key controls.
+// ---------------------------------------------------------------------------
+//
+void CPeninputTapSettingManager::GetKeyExtResponseArea( TMargins& aMargins )
+    {
+    aMargins = iKeyMargins;
+    }
+
+// ---------------------------------------------------------------------------
+// Get extra response area of button controls.
+// ---------------------------------------------------------------------------
+//
+void CPeninputTapSettingManager::GetButtonExtResponseArea( TMargins& aMargins )
+    {
+    aMargins = iButtonMargins;
+    }
+
+// ---------------------------------------------------------------------------
+// C++ constructor.
+// ---------------------------------------------------------------------------
+//
+CPeninputTapSettingManager::CPeninputTapSettingManager()
+    {
+    
+    }
+
+// ---------------------------------------------------------------------------
+// Symbian second-phase constructor.
+// ---------------------------------------------------------------------------
+//
+void CPeninputTapSettingManager::ConstructL()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// Load all parameters of tap accuracy enhancement for specified layout.
+// From Repository.
+// ---------------------------------------------------------------------------
+//
+void CPeninputTapSettingManager::LoadFromRepositoryL( TInt aLayoutType )
+    {
+    TUint32 uidButtonExtMargins   = 0;
+    TUint32 uidKeyCtrlExtMargins  = 0;
+    TUint32 uidPointerMoveMaxMove = 0;
+    TUint32 uidPointerMoveTimeout = 0;
+    TUint32 uidPointerUpMaxMove   = 0;
+    TUint32 uidPointerUpTimeout   = 0;
+
+    switch( aLayoutType )
+        {
+        case EPluginInputModeFSQ:
+            {
+            uidButtonExtMargins   = KAknFepTapAccuracyFsqButtonExtMargins;
+            uidKeyCtrlExtMargins  = KAknFepTapAccuracyFsqKeyCtrlExtMargins;
+            uidPointerMoveMaxMove = KAknFepTapAccuracyFsqPointerMoveMaxMovement;
+            uidPointerMoveTimeout = KAknFepTapAccuracyFsqPointerMoveTimeout;
+            uidPointerUpMaxMove   = KAknFepTapAccuracyFsqPointerUpMaxMovement;
+            uidPointerUpTimeout   = KAknFepTapAccuracyFsqPointerUpTimeout;
+            }
+            break;
+        case EPluginInputModePortraitFSQ:
+            {
+            uidButtonExtMargins   = KAknFepTapAccuracyPFsqButtonExtMargins;
+            uidKeyCtrlExtMargins  = KAknFepTapAccuracyPFsqKeyCtrlExtMargins;
+            uidPointerMoveMaxMove = KAknFepTapAccuracyPFsqPointerMoveMaxMovement;
+            uidPointerMoveTimeout = KAknFepTapAccuracyPFsqPointerMoveTimeout;
+            uidPointerUpMaxMove   = KAknFepTapAccuracyPFsqPointerUpMaxMovement;
+            uidPointerUpTimeout   = KAknFepTapAccuracyPFsqPointerUpTimeout;
+            }
+            break;
+        case EPluginInputModeFingerHwr:
+            {
+            uidButtonExtMargins   = KAknFepTapAccuracyFhwrButtonExtMargins;
+            uidKeyCtrlExtMargins  = KAknFepTapAccuracyFhwrKeyCtrlExtMargins;
+            uidPointerMoveMaxMove = KAknFepTapAccuracyFhwrPointerMoveMaxMovement;
+            uidPointerMoveTimeout = KAknFepTapAccuracyFhwrPointerMoveTimeout;
+            uidPointerUpMaxMove   = KAknFepTapAccuracyFhwrPointerUpMaxMovement;
+            uidPointerUpTimeout   = KAknFepTapAccuracyFhwrPointerUpTimeout;
+            }
+            break;            
+        default:
+            {
+            uidButtonExtMargins   = KAknFepTapAccuracyDefaultButtonExtMargins;
+            uidKeyCtrlExtMargins  = KAknFepTapAccuracyDefaultKeyCtrlExtMargins;
+            uidPointerMoveMaxMove = KAknFepTapAccuracyDefaultPointerMoveMaxMovement;
+            uidPointerMoveTimeout = KAknFepTapAccuracyDefaultPointerMoveTimeout;
+            uidPointerUpMaxMove   = KAknFepTapAccuracyDefaultPointerUpMaxMovement;
+            uidPointerUpTimeout   = KAknFepTapAccuracyDefaultPointerUpTimeout;
+            }
+        }
+    
+    CRepository* repository = CRepository::NewL( KCRUidAknFep );
+    TBuf<KTextBufferLength> str;
+    TInt num = 0;
+    TPoint point;
+    TMargins margins;
+    
+    //pointer move event
+    repository->Get( uidPointerMoveTimeout, num );
+    repository->Get( uidPointerMoveMaxMove, str );
+    ParsePoints( point, str );
+    
+    iPointerMoveTimeout = num;
+    iPointerMoveMaxMovement.iWidth = point.iX;
+    iPointerMoveMaxMovement.iHeight = point.iY;
+    
+    //pointer up event
+    repository->Get( uidPointerUpTimeout, num );
+    repository->Get( uidPointerUpMaxMove, str );
+    ParsePoints( point, str );
+    
+    iPointerUpTimeout = num;
+    iPointerUpMaxMovement.iWidth = point.iX;
+    iPointerUpMaxMovement.iHeight = point.iY;   
+    
+    //key control
+    repository->Get( uidKeyCtrlExtMargins, str );
+    ParseMargins( margins, str );
+    iKeyMargins = margins;
+    
+    //button control
+    repository->Get( uidButtonExtMargins, str );
+    ParseMargins( margins, str );
+    iButtonMargins = margins;
+    
+    delete repository;
+    }
+
+// ---------------------------------------------------------------------------
+// Load all parameters of tap accuracy enhancement for specified layout.
+// From file.
+// ---------------------------------------------------------------------------
+//
+void CPeninputTapSettingManager::LoadFromFileL( TInt /*aLayoutType*/, 
+                                                const TDesC& /*aFileName*/ )
+    {
+    //reserved
+    }
+
+// ---------------------------------------------------------------------------
+// Load default parameters.
+// ---------------------------------------------------------------------------
+//
+void CPeninputTapSettingManager::LoadDefault()
+    {
+    iPointerMoveMaxMovement = TSize( KDefaultMovement, KDefaultMovement );
+    iPointerMoveTimeout     = KDefaultTimeout;
+    
+    iPointerUpMaxMovement   = TSize( KDefaultMovement, KDefaultMovement );
+    iPointerUpTimeout       = KDefaultTimeout;
+    
+    iKeyMargins.iTop        = KDefaultMargin;
+    iKeyMargins.iLeft       = KDefaultMargin;
+    iKeyMargins.iBottom     = KDefaultMargin;
+    iKeyMargins.iRight      = KDefaultMargin;
+    
+    iButtonMargins.iTop     = KDefaultMargin;
+    iButtonMargins.iLeft    = KDefaultMargin;
+    iButtonMargins.iBottom  = KDefaultMargin;
+    iButtonMargins.iRight   = KDefaultMargin;
+    }
+
+// ---------------------------------------------------------------------------
+// parse a TPoint from a comma separated values string.
+// ---------------------------------------------------------------------------
+//
+TInt CPeninputTapSettingManager::ParsePoints( TPoint& aPoint, const TDesC& aText )
+    {
+    TPtrC tokenizer( aText );
+    TInt pos = tokenizer.Find( KSeparatorComma );
+    if ( pos == KErrNotFound )
+        {
+        TInt value = 0;
+        TLex converter( tokenizer );
+        TInt error = converter.Val( value );
+        aPoint.iX = ( KErrNone == error ? value : 0 );
+        aPoint.iY = aPoint.iX;
+        return 0;
+        }
+
+    TInt value = 0;
+   
+    TLex converter( tokenizer.Left( pos ) );
+    TInt error = converter.Val( value );
+    aPoint.iX = ( KErrNone == error ? value : 0 );
+    
+    converter = TLex( tokenizer.Mid( pos + 1 ) );
+    error = converter.Val( value );
+    aPoint.iY = ( KErrNone == error ? value : 0 );
+    
+    return 0;
+    }
+
+// ---------------------------------------------------------------------------
+// parse a TMargins from a comma separated values string.
+// ---------------------------------------------------------------------------
+//
+TInt CPeninputTapSettingManager::ParseMargins( TMargins& aMargins, const TDesC& aText )
+    {
+    RArray<TInt> values;
+    
+    TPtrC tokenizer( aText );
+    TInt pos = 0;
+    while ( pos != KErrNotFound )
+        {
+        pos = tokenizer.Find( KSeparatorComma );
+            
+        TPtrC substr = ( pos == KErrNotFound ) ? tokenizer : tokenizer.Left( pos );
+        TInt value = 0;
+        TLex converter( substr );
+        TInt error = converter.Val( value );
+        values.Append( KErrNone == error ? value : 0 );
+        
+        if ( pos != KErrNotFound )
+            {
+            TPtrC right = tokenizer.Mid( pos + 1 );
+            tokenizer.Set( right );
+            }
+        }
+    
+    TInt count = values.Count();
+    
+    //one value, applies to all sides
+    if(  count == 1  )
+        {
+        aMargins.iTop    = values[0];
+        aMargins.iLeft   = values[0];
+        aMargins.iBottom = values[0];
+        aMargins.iRight  = values[0];
+        }
+    
+    //two values, first one specifies margins of top and bottom,
+    //the second specifies left and right. 
+    else if(  count == 2 )
+        {
+        aMargins.iTop    = values[0];
+        aMargins.iLeft   = values[1];
+        aMargins.iBottom = values[0];
+        aMargins.iRight  = values[1];
+        }
+
+    //three values, first is top, second is the left and right, last is bottom. 
+    else if(  count == 3 )
+        {
+        aMargins.iTop    = values[0];
+        aMargins.iLeft   = values[1];
+        aMargins.iBottom = values[1];
+        aMargins.iRight  = values[2];
+        }
+    
+    //four values, specify top,left,bottom and right respectively
+    else if ( count >= 4 )
+        {
+        aMargins.iTop    = values[0];
+        aMargins.iLeft   = values[1];
+        aMargins.iBottom = values[2];
+        aMargins.iRight  = values[3];
+        }
+    
+    else
+        {
+        aMargins.iTop    = 0;
+        aMargins.iLeft   = 0;
+        aMargins.iBottom = 0;
+        aMargins.iRight  = 0;
+        }
+    
+    values.Close();
+    return count;
+    }
+
+//end of file
--- a/textinput/peninputarc/src/peninputlayoutcontrol/peninputuilayout.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/src/peninputlayoutcontrol/peninputuilayout.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -35,6 +35,11 @@
 #include <touchfeedback.h>
 #include <featmgr.h>
 #endif //RD_TACTILE_FEEDBACK
+
+#include <AknFepGlobalEnums.h>
+#include <layoutmetadata.cdl.h>
+#include "peninputtapsettingmanager.h"
+
 // ======== MEMBER FUNCTIONS ========
 
 // ---------------------------------------------------------------------------
@@ -85,6 +90,20 @@
     iExtension->iSkinInstance = AknsUtils::SkinInstance();
     iExtension->iTouchFeedbackInstance = MTouchFeedback::Instance();
 	iExtension->iDisableDrawing = EFalse;
+
+    TInt inputMode = PenInputType();
+    TBool isPortraitFSQEnabled = FeatureManager::FeatureSupported(
+            KFeatureIdFfVirtualFullscrPortraitQwertyInput );
+
+    //detect real type of two qwerty layout
+    if ( inputMode == EPluginInputModeFSQ && isPortraitFSQEnabled
+         && !Layout_Meta_Data::IsLandscapeOrientation() )
+        {
+        inputMode = EPluginInputModePortraitFSQ;
+        }
+
+    //load settings of tap accuracy enhancement
+    LoadTapAccuracySettingsL( inputMode );
     }
 
 // ---------------------------------------------------------------------------
@@ -474,7 +493,22 @@
     iRootCtrl->OnActivate();
 #ifdef RD_TACTILE_FEEDBACK  
     iExtension->iTactileSupported = FeatureManager::FeatureSupported( KFeatureIdTactileFeedback );
-#endif // RD_TACTILE_FEEDBACK      
+#endif // RD_TACTILE_FEEDBACK
+    
+    //update pointer event suppressor
+    if ( FeatureManager::FeatureSupported( KFeatureIdFfCapacitiveDisplay ) )
+        {
+        TPointerEventSuppressorParameters parameters;
+        parameters.iMoveEventMaxMovement = iExtension->iPointerMoveSuppressMaxMovement;
+        parameters.iMoveEventTimeout = iExtension->iPointerMoveSuppressTimeout;
+        parameters.iUpEventMaxMovement = iExtension->iPointerUpSuppressMaxMovement;
+        parameters.iUpEventTimeout = iExtension->iPointerUpSuppressTimeout;
+        
+        TPtrC data( reinterpret_cast<TUint16*>(&parameters),
+                    sizeof(TPointerEventSuppressorParameters) / 2 );
+        
+        SignalOwner( ESignalUpdatePointerSuppressor, data );
+        }
     }
     
 // ---------------------------------------------------------------------------
@@ -923,4 +957,43 @@
     SignalOwner(ESignalDisableUpdating,ptr);
     }
 
+// ---------------------------------------------------------------------------
+// Get extra response area of key controls.
+// ---------------------------------------------------------------------------
+//
+void CFepUiLayout::GetKeyExtResponseArea( TMargins& aMargins )
+    {
+    aMargins = iExtension->iKeyExtResponseMargins;
+    }
+
+// ---------------------------------------------------------------------------
+// Get extra response area of button controls.
+// ---------------------------------------------------------------------------
+//
+void CFepUiLayout::GetButtonExtResponseArea( TMargins& aMargins )
+    {
+    aMargins = iExtension->iButtonExtResponseMargins;
+    }
+
+// ---------------------------------------------------------------------------
+// Load tap accuracy enhancement settings according to the specified input mode.
+// ---------------------------------------------------------------------------
+//
+void CFepUiLayout::LoadTapAccuracySettingsL( TInt alayoutType )
+    {
+    CPeninputTapSettingManager* manager = CPeninputTapSettingManager::NewL();
+    
+    manager->Load( alayoutType );
+    manager->GetPointerMoveSuppressor( iExtension->iPointerMoveSuppressMaxMovement, 
+                                      iExtension->iPointerMoveSuppressTimeout );
+
+    manager->GetPointerUpSuppressor( iExtension->iPointerUpSuppressMaxMovement, 
+                                      iExtension->iPointerUpSuppressTimeout );
+    
+    manager->GetKeyExtResponseArea( iExtension->iKeyExtResponseMargins );
+    manager->GetButtonExtResponseArea( iExtension->iButtonExtResponseMargins );
+    
+    delete manager;
+    }
+
 //end of file
--- a/textinput/peninputarc/src/peninputserverapp/peninputanimclientobj.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/src/peninputserverapp/peninputanimclientobj.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -503,4 +503,21 @@
     AddAnimCommand(cmd);
     return ETrue;		
 	}
+
+// ---------------------------------------------------------------------------
+// CPeninputAnimObj::UpdatePointerEventSuppressor()
+// Update parameters of pointer event suppressor.
+// ---------------------------------------------------------------------------
+//
+void CPeninputAnimObj::UpdatePointerEventSuppressor( 
+        const TPointerEventSuppressorParameters& aParameters )
+    {
+    TAnimUpdatePointerEventSuppressorCmd* cmd = 
+            new TAnimUpdatePointerEventSuppressorCmd( iAnim, aParameters );
+    
+    if ( cmd != NULL )
+        {
+        AddAnimCommand( cmd );
+        }
+    }
 //end of file
--- a/textinput/peninputarc/src/peninputserverapp/peninputanimcommand.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/src/peninputserverapp/peninputanimcommand.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -362,3 +362,17 @@
     iAnim.SetDiscreeptPop(iArea);
     return ETrue;
 	}
+
+TAnimUpdatePointerEventSuppressorCmd::TAnimUpdatePointerEventSuppressorCmd( 
+        RPeninputAnim& aAnim, const TPointerEventSuppressorParameters& aParameters )
+        : TAnimCmd( aAnim ), iParameters( aParameters )
+    {
+    
+    }
+
+TBool TAnimUpdatePointerEventSuppressorCmd::ExecuteAnimCommand() const
+    {
+    iAnim.UpdatePointerEventSuppressor( iParameters );
+    return ETrue;
+    }
+
--- a/textinput/peninputarc/src/peninputserverapp/peninputserver.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/src/peninputserverapp/peninputserver.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -863,7 +863,17 @@
     //message requests UI attribute is always handled.
     switch(aMessage.Function())
         {
-        
+        case EPeninputRequestEnableGfxTransEffect:
+            {
+            if( iUseWindowCtrl && iPenUiCtrl )
+                {
+                TBool enable = EFalse;
+                TPckg<TBool> msg( enable );
+                aMessage.ReadL( 0,msg );
+                iPenUiCtrl->EnableGfxTransEffect( enable );
+                }
+            }
+            break;
         case EPeninputRequestUiIsVisible:
             {                      
             TPckg<TBool> msg(iActive);
@@ -2015,7 +2025,11 @@
 				iIsLayoutReDrawAllowWhenActive = *retVal;
 				}
 				break;	
-
+            case ESignalUpdatePointerSuppressor:
+                {               
+                UpdatePointerEventSuppressor( aEventData );
+                }
+                break;
         	default:
         	    if(iUseWindowCtrl)                    
         	        {
@@ -3031,6 +3045,21 @@
 	iDiscreetPopArea = iAknUiSrv.GetInUseGlobalDiscreetPopupRect();
 	iAnimObj->SetDiscreetPopArea(iDiscreetPopArea);
     }
+
+// ---------------------------------------------------------------------------
+// CPeninputServer::UpdatePointerEventSuppressor()
+// Update parameters of pointer event suppressor.
+// ---------------------------------------------------------------------------
+//
+void CPeninputServer::UpdatePointerEventSuppressor( const TDesC& aData )
+    {
+    TUint16* buf = const_cast<TUint16* >( aData.Ptr() );
+    TPointerEventSuppressorParameters* parameters = 
+            reinterpret_cast<TPointerEventSuppressorParameters*> ( buf );
+    
+    iAnimObj->UpdatePointerEventSuppressor( *parameters );
+    }
+
 // ======== class CEventQueue========
 //
 // ---------------------------------------------------------------------------
--- a/textinput/peninputarc/src/peninputserverapp/peninputserversession.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/src/peninputserverapp/peninputserversession.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -320,6 +320,7 @@
         case EPeninputRequestSupportInputMode:
         case EPeninputRequestSetInputLanguage:
 		case EPeninputEnablePriorityChangeOnOriChange:
+		case EPeninputRequestEnableGfxTransEffect:
             ret = iPenInputSvr.HandleMessageL(aMessage);            
             break;
         case EPeninputRequestUpdateAppInfo:            
--- a/textinput/peninputarc/src/peninputserverapp/penuiwndctrl.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/src/peninputserverapp/penuiwndctrl.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -419,8 +419,9 @@
 	
 #ifdef RD_UI_TRANSITION_EFFECTS_POPUPS      
 	
-    if ( GfxTransEffect::IsRegistered( this ) && !IsVisible())
+    if ( iEnableGfxTransEffect && GfxTransEffect::IsRegistered( this ) && !IsVisible())
         {
+        iEnableGfxTransEffect = EFalse;
         this->MakeVisible(EFalse);
         GfxTransEffect::NotifyExternalState( ENotifyGlobalAbort ); 
 
@@ -463,9 +464,9 @@
         return;
         }
 #ifdef RD_UI_TRANSITION_EFFECTS_POPUPS           
-    if ( GfxTransEffect::IsRegistered( this ))
+    if ( iEnableGfxTransEffect && GfxTransEffect::IsRegistered( this ) )
         {
-
+        iEnableGfxTransEffect = EFalse;
         GfxTransEffect::NotifyExternalState( ENotifyGlobalAbort ); 
 
         //If still visible, do a transition to invisible state.
--- a/textinput/peninputarc/src/peninputserverapp/rpeninputanim.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputarc/src/peninputserverapp/rpeninputanim.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -336,4 +336,19 @@
     args.Set(KMsgSlot1,&msgData);
     CommandReply(EPeninputOpSetDiscreeptPop,KNullDesC8,args);           
     } 
+
+// ---------------------------------------------------------------------------
+// RPeniputAnim::UpdatePointerEventSuppressor()
+// Update parameters of pointer event suppressor.
+// ---------------------------------------------------------------------------
+//
+void RPeninputAnim::UpdatePointerEventSuppressor( 
+        const TPointerEventSuppressorParameters& aParameters )
+    {
+    TIpcArgs args( TIpcArgs::ENothing );        
+    TPckg<TPointerEventSuppressorParameters> msgData( aParameters );
+    args.Set(KMsgSlot1, &msgData );
+    CommandReply( EPeninputOpUpdatePointerSuppressor, KNullDesC8, args );     
+    }
+
 // End of File
--- a/textinput/peninputfingerhwr/src/peninputfingerhwrwnd.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputfingerhwr/src/peninputfingerhwrwnd.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -1223,7 +1223,13 @@
     // hide the predictive list
     iPredictList->Hide( ETrue );
     iPredictList->SetDropdownListImgID( predicDrawInfo );
-    
+               
+    iPredictList->SizeChanged( iLafManager->CandidateUnitWidth(),
+            iLafManager->CandidateUnitHeight(),
+            iLafManager->CandidateUnitWidth(), 
+            iLafManager->PredictiveLTPos(),
+            KPredictiveCountPerRow,
+            KPredictiveRowCount );
     
 #ifndef RD_INTELLIGENT_TEXT_INPUT
     TDropdownListDrawInfo candiDrawInfo( 
--- a/textinput/peninputgenericitut/src/peninputgenericitutdatamgr.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputgenericitut/src/peninputgenericitutdatamgr.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -494,7 +494,7 @@
 	TRect cellSpellRect;
 	cellSpellRect.iTl.iX = middleButtonPaneRect.iTl.iX;
 	cellSpellRect.iTl.iY = middleButtonPaneRect.iTl.iY + 
-			itucellrect.Rect().Height() * 5 + 7;
+			itucellrect.Rect().Height() * 5;
 	cellSpellRect.SetHeight( itucellrect.Rect().Height());
 	cellSpellRect.SetWidth( itucellrect.Rect().Width());
 		
@@ -907,8 +907,18 @@
     iCandsUnitHeight = charpanerect1.Rect().Height() ;
     
     iCandsSpinBtnHeight = listctrlrect.Rect().Height();
+    
+    TInt gapValue = ( iScreenSize.iWidth - ( 
+    		iCandsUnitWidth + iCandsHorizontalMargin + KCandsAdjustment ) * 6 ) / 2;
+    if ( gapValue < 0 )
+    	{
+		gapValue = 0;
+    	}
+    
     iCandsSpellLTPos = charpanerect1.Rect().iTl;
+    iCandsSpellLTPos.iX = gapValue;
     iCandsLTPos = charpanerect3.Rect().iTl;
+    iCandsLTPos.iX = gapValue;
     iCandsPuncLTPos = iCandsSpellLTPos;
     
     TAknTextLineLayout candstxtlayout = 
--- a/textinput/peninputgenericvkb/src/peninputgenericlafdatamgr.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputgenericvkb/src/peninputgenericlafdatamgr.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -1038,12 +1038,17 @@
     aDataInfo.iQwtRect = aParentWndRect;
     
     TInt v1, v2, gridLayoutVariant;
+
+    // Get the variant for Portrait QWERTY
+    TInt cellVariantForPortraitQWERTY;
+    
     switch ( aLayoutType )
         {
         case ELayout10x3:
             {
             v1 = 0;
             v2 = 0;
+            cellVariantForPortraitQWERTY = 0;
             gridLayoutVariant = 1;
             break;
             }
@@ -1051,6 +1056,7 @@
             {
             v1 = 1;
             v2 = 2;
+            cellVariantForPortraitQWERTY = 2;
             gridLayoutVariant = 1;
             break;
             }
@@ -1058,6 +1064,7 @@
             {
             v1 = 1;
             v2 = 3;
+            cellVariantForPortraitQWERTY = 3;
             gridLayoutVariant = 2;
             break;
             }
@@ -1065,7 +1072,9 @@
             {
             v1 = 0;
             v2 = 0;
+            cellVariantForPortraitQWERTY = 0;
             gridLayoutVariant = 1;
+            break;
             }
         }
     
@@ -1164,6 +1173,32 @@
     linelayout = AknLayoutScalable_Avkon::grid_vkbss_keypad_pane(v1).LayoutLine();
     keypadRect.LayoutRect( rectBottomWin, linelayout );
     
+    TInt rowNumberOfKeyboard;
+    TInt gapValue;
+    switch ( aLayoutType )
+        {
+        case ELayout10x3:
+            {
+            rowNumberOfKeyboard = 3;
+            break;
+            }
+        case ELayout11x3:
+            {
+            rowNumberOfKeyboard = 3;
+            break;
+            }
+        case ELayout11x4:
+            {
+            rowNumberOfKeyboard = 4;
+            break;
+            }
+        default:
+            {
+            rowNumberOfKeyboard = 3;
+            break;
+            }
+        }
+    
     if ( !isPortraitFSQEnabled ||
         ( isPortraitFSQEnabled && Layout_Meta_Data::IsLandscapeOrientation() ) )
         {
@@ -1192,7 +1227,10 @@
         pic3pRightWidth = layoutrect.Rect().Width();
         
         TRect rectXPane = keypaneRect.Rect();
-        rect = keycellRect.Rect();
+        
+        // the key rect without gap
+        rect = keypaneRect.Rect();
+    
         rect.Move( - rectXPane.iTl.iX, - rectXPane.iTl.iY );
         TRect rectXBorder = rect;
         rect = keylabelRect.Rect();
@@ -1205,11 +1243,14 @@
         
         rect = keypadRect.Rect();
         rect.Move( - base.iX, - base.iY );
-        TRect rectOfKeypad = rect;
-        TRect rectOfButtons = rectOfKeypad;
-        rectOfKeypad.iBr.iY -= keypaneRect.Rect().Height(); 
-        rectOfButtons.iTl.iY += rectOfKeypad.Height();
-        
+    
+        TRect rectOfButtons = rect;
+        // The gap between the top of the first row key and the top of the keyboard
+        gapValue = keypaneRect.Rect().iTl.iY - keypadRect.Rect().iTl.iY;
+        // compute the top left Y coordinate of the function buttons
+        rectOfButtons.iTl.iY = rectOfButtons.iTl.iY + 
+    		keypaneRect.Rect().Height() * rowNumberOfKeyboard + gapValue;
+    
         TInt spaceBtnWidth = rectOfButtons.Width() - rectXPane.Width() * 8;
         TInt dx = rectOfButtons.iTl.iX;
         TInt dy = rectOfButtons.iTl.iY;
@@ -1270,8 +1311,8 @@
         linelayout = AknLayoutScalable_Avkon::cell_vkbss_key_pane(15).LayoutLine();
         bottomRowRect.LayoutRect( keypadRect.Rect(), linelayout );
         
-        // key cell rect
-        linelayout = AknLayoutScalable_Avkon::bg_cell_vkbss_key_g1(8).LayoutLine();
+        // key cell rect with out gap
+        linelayout = AknLayoutScalable_Avkon::cell_vkbss_key_pane(15).LayoutLine();
         keycellRect.LayoutRect( bottomRowRect.Rect(), linelayout );
         
         // key label rect
@@ -1289,10 +1330,23 @@
         
         rect = keypadRect.Rect();
         rect.Move( - base.iX, - base.iY );
-        TRect rectOfKeypad = rect;
-        TRect rectOfButtons = rectOfKeypad;
-        rectOfKeypad.iBr.iY -= ( bottomRowRect.Rect().Height() );
-        rectOfButtons.iTl.iY += rectOfKeypad.Height();
+        
+        // Get the height of one key
+        linelayout = AknLayoutScalable_Avkon::cell_vkbss_key_pane( 
+        		cellVariantForPortraitQWERTY ).LayoutLine();
+        keycellRect.LayoutRect( keypadRect.Rect(), linelayout );
+        TInt theHeightOfTheKey = keycellRect.Rect().Height();
+        // Compute the gap between the top of the first row key and 
+        // the top of the keyboard
+        gapValue = keycellRect.Rect().iTl.iY - keypadRect.Rect().iTl.iY;
+        // Get the second row function button's height
+        linelayout = AknLayoutScalable_Avkon::cell_vkbss_key_pane(4).LayoutLine();
+        keycellRect.LayoutRect( keypadRect.Rect(), linelayout );
+        
+        TRect rectOfButtons = rect;
+        // compute the top left Y coordinate of the first row function buttons
+        rectOfButtons.iTl.iY += keycellRect.Rect().Height() + 
+        		theHeightOfTheKey * rowNumberOfKeyboard + gapValue + 1;
         
         TInt dx = rectOfButtons.iTl.iX;
         TInt dy = rectOfButtons.iTl.iY;
@@ -1332,8 +1386,8 @@
         linelayout = AknLayoutScalable_Avkon::cell_vkbss_key_pane(4).LayoutLine();
         shiftRect.LayoutRect( keypadRect.Rect(), linelayout );
         
-        // key cell rect
-        linelayout = AknLayoutScalable_Avkon::bg_cell_vkbss_key_g1(4).LayoutLine();
+        // key cell rect without gap
+        linelayout = AknLayoutScalable_Avkon::cell_vkbss_key_pane(4).LayoutLine();
         keycellRect.LayoutRect( shiftRect.Rect(), linelayout );
         
         // key label rect
@@ -1351,6 +1405,8 @@
         
         // Update the height to account for the second row
         rectOfButtons.iTl.iY -= shiftRect.Rect().Height();
+        // adjust the Y coordinate
+        rectOfButtons.iTl.iY -= 1;
         
         dx = rectOfButtons.iTl.iX;
         dy = rectOfButtons.iTl.iY;
@@ -1363,8 +1419,8 @@
         linelayout = AknLayoutScalable_Avkon::cell_vkbss_key_pane(8).LayoutLine();
         spaceRect.LayoutRect( keypadRect.Rect(), linelayout );
         
-        // key cell rect
-        linelayout = AknLayoutScalable_Avkon::bg_cell_vkbss_key_g1(5).LayoutLine();
+        // key cell rect without gap
+        linelayout = AknLayoutScalable_Avkon::cell_vkbss_key_pane(8).LayoutLine();
         keycellRect.LayoutRect( spaceRect.Rect(), linelayout );
         
         // key label rect
@@ -1660,6 +1716,8 @@
     TAknLayoutText keyTextLayout; 
 	TAknTextLineLayout keyText;
 	TRect keyRect;
+	// The gap value of keyboard
+	TInt gapValue;
 
     TBool isLandscape = Layout_Meta_Data::IsLandscapeOrientation();
 
@@ -1733,7 +1791,12 @@
         }
   	    
   	rectVkbCtrl = keypadRect.Rect();
-    rectVkbCtrl.iBr.iY -= functionKeyRowsHeight;
+  	// Compute the gap between first row key's top line and keyboard's top line
+  	gapValue = keypaneRect.Rect().iTl.iY - rectVkbCtrl.iTl.iY;
+  	// Compute keyboard position
+  	rectVkbCtrl.iBr.iY = rectVkbCtrl.iTl.iY + keypaneRect.Rect().Height() * 3 + gapValue;
+  	rectVkbCtrl.iTl.iY += gapValue;
+  	
   	dataInfo->iKeypad.iKaypadRect = rectVkbCtrl;
 
   	linelayout = AknLayoutScalable_Avkon::bg_cell_vkbss_key_g1(0).LayoutLine();
@@ -1742,10 +1805,6 @@
   	linelayout = AknLayoutScalable_Avkon::cell_vkbss_key_g1(0).LayoutLine();
   	keylabelRect.LayoutRect( keypaneRect.Rect(), linelayout );
 
-  	linelayout = AknLayoutScalable_Avkon::aid_vkbss_key_offset(0).LayoutLine();    
-  	layoutrect.LayoutRect( keypadRect.Rect(), linelayout );
-  	TInt rowIndentWidth = layoutrect.Rect().Width();
-  	
     TRect rectOfKeypad = RelativeRect( keypadRect.Rect(), base );
     rectOfKeypad.iBr.iY -= keypaneRect.Rect().Height(); 
   	
@@ -1759,18 +1818,15 @@
   	
   	for( TInt i = 0; i < KKeypadLayout[0][1]; i++)
   		{
-  		TInt indent = ( i % 2 == 1 ) ? rowIndentWidth : 0;
   		for( TInt j = 0; j < KKeypadLayout[0][0]; j++)
             {
 			TRect bound = rectXPane;
             bound.Move( j * rectXPane.Width(), i * rectXPane.Height() );
-            bound.Move( indent, 0 );
             
             dataInfo->iKeypad.iRects.AppendL( bound );
             
             TRect inner = rectXPane;
             inner.Move( j * rectXPane.Width(), i * rectXPane.Height() );
-            inner.Move( indent, 0 );        
             
             TAknLayoutText keyTextLayout; 
             keyTextLayout.LayoutText( inner, keyText );
@@ -1888,7 +1944,13 @@
         }
   	    
   	rectVkbCtrl = keypadRect.Rect();
-    rectVkbCtrl.iBr.iY -= functionKeyRowsHeight;
+    
+  	// Compute the gap between first row key's top line and keyboard's top line
+    gapValue = keypaneRect.Rect().iTl.iY - rectVkbCtrl.iTl.iY;
+    // Compute keyboard position
+    rectVkbCtrl.iBr.iY = rectVkbCtrl.iTl.iY + keypaneRect.Rect().Height() * 3 + gapValue;
+    rectVkbCtrl.iTl.iY += gapValue;
+    
     dataInfo->iKeypad.iKaypadRect = rectVkbCtrl;
 
     linelayout = AknLayoutScalable_Avkon::bg_cell_vkbss_key_g1(2).LayoutLine();
@@ -1897,10 +1959,6 @@
     linelayout = AknLayoutScalable_Avkon::cell_vkbss_key_g1(2).LayoutLine();
     keylabelRect.LayoutRect( keypaneRect.Rect(), linelayout );
 
-    linelayout = AknLayoutScalable_Avkon::aid_vkbss_key_offset(1).LayoutLine();    
-    layoutrect.LayoutRect( keypadRect.Rect(), linelayout );
-    rowIndentWidth = layoutrect.Rect().Width();
-    
     rectOfKeypad = RelativeRect( keypadRect.Rect(), base );
     rectOfKeypad.iBr.iY -= keypaneRect.Rect().Height(); 
     
@@ -1914,18 +1972,15 @@
     
     for( TInt i = 0; i < KKeypadLayout[1][1]; i++)
         {
-        TInt indent = ( i % 2 == 1 ) ? rowIndentWidth : 0;
         for( TInt j = 0; j < KKeypadLayout[1][0]; j++)
             {
 		    TRect bound = rectXPane;
             bound.Move( j * rectXPane.Width(), i * rectXPane.Height() );
-            bound.Move( indent, 0 );
             
             dataInfo->iKeypad.iRects.AppendL( bound );
             
             TRect inner = rectXPane;
             inner.Move( j * rectXPane.Width(), i * rectXPane.Height() );
-            inner.Move( indent, 0 );        
             
             TAknLayoutText keyTextLayout; 
             keyTextLayout.LayoutText( inner, keyText );
@@ -2031,8 +2086,14 @@
         keypaneRect.LayoutRect( keypadRect.Rect(), linelayout );
         }
   	    
-  	rectVkbCtrl = keypadRect.Rect();
-    rectVkbCtrl.iBr.iY -= functionKeyRowsHeight;
+    rectVkbCtrl = keypadRect.Rect();
+    
+    // Compute the gap between first row key's top line and keyboard's top line
+    gapValue = keypaneRect.Rect().iTl.iY - rectVkbCtrl.iTl.iY;
+    // Compute keyboard position
+    rectVkbCtrl.iBr.iY = rectVkbCtrl.iTl.iY + keypaneRect.Rect().Height() * 4 + gapValue;
+    rectVkbCtrl.iTl.iY += gapValue;
+    
     dataInfo->iKeypad.iKaypadRect = rectVkbCtrl;    
 
     linelayout = AknLayoutScalable_Avkon::bg_cell_vkbss_key_g1(3).LayoutLine();
@@ -2041,10 +2102,6 @@
     linelayout = AknLayoutScalable_Avkon::cell_vkbss_key_g1(3).LayoutLine();
     keylabelRect.LayoutRect( keypaneRect.Rect(), linelayout );
 
-    linelayout = AknLayoutScalable_Avkon::aid_vkbss_key_offset(1).LayoutLine();    
-    layoutrect.LayoutRect( keypadRect.Rect(), linelayout );
-    rowIndentWidth = layoutrect.Rect().Width();
-    
     rectOfKeypad = RelativeRect( keypadRect.Rect(), base );
     rectOfKeypad.iBr.iY -= keypaneRect.Rect().Height(); 
     
@@ -2058,18 +2115,15 @@
     
     for( TInt i = 0; i < KKeypadLayout[2][1]; i++)
         {
-        TInt indent = ( i % 2 == 1 ) ? rowIndentWidth : 0;
         for( TInt j = 0; j < KKeypadLayout[2][0]; j++)
             {
 		    TRect bound = rectXPane;
             bound.Move( j * rectXPane.Width(), i * rectXPane.Height() );
-            bound.Move( indent, 0 );
             
             dataInfo->iKeypad.iRects.AppendL( bound );
             
             TRect inner = rectXPane;
             inner.Move( j * rectXPane.Width(), i * rectXPane.Height() );
-            inner.Move( indent, 0 );        
             
             TAknLayoutText keyTextLayout; 
             keyTextLayout.LayoutText( inner, keyText );
--- a/textinput/peninputsplititut/src/peninputsplititutdatamgr.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputsplititut/src/peninputsplititutdatamgr.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -359,7 +359,7 @@
 	TRect cellSpellRect;
 	cellSpellRect.iTl.iX = middleButtonPaneRect.iTl.iX;
 	cellSpellRect.iTl.iY = middleButtonPaneRect.iTl.iY + 
-			itucellrect.Rect().Height() * 5 + 7;
+			itucellrect.Rect().Height() * 5;
 	cellSpellRect.SetHeight( itucellrect.Rect().Height());
 	cellSpellRect.SetWidth( itucellrect.Rect().Width());
 
--- a/textinput/peninputsplitqwerty/src/peninputsplitqwertylafdatamgr.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputsplitqwerty/src/peninputsplitqwertylafdatamgr.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -345,10 +345,6 @@
     layoutrect.LayoutRect( pic3paneRect.Rect(), linelayout );
     pic3pRightWidth = layoutrect.Rect().Width();
 
-    linelayout = AknLayoutScalable_Avkon::aid_vkbss_key_offset(v1).LayoutLine();    
-    layoutrect.LayoutRect( keypadRect.Rect(), linelayout );
-    TInt rowIndentWidth = layoutrect.Rect().Width();
-
     base = rectMainWin.iTl;
 
     data->iClientRect =  RelativeRect( rectMainWin, base );
@@ -356,8 +352,43 @@
 
     TRect rectOfKeypad = RelativeRect( keypadRect.Rect(), base );
     TRect rectOfButtons = rectOfKeypad;
-    rectOfKeypad.iBr.iY -= keypaneRect.Rect().Height(); 
-    rectOfButtons.iTl.iY += rectOfKeypad.Height();
+    
+    TInt rowNumberOfKeyboard;
+    TInt gapValue;
+    switch ( aLayoutType )
+        {
+        case ELayout10x3:
+            {
+            rowNumberOfKeyboard = 3;
+            break;
+            }
+        case ELayout11x3:
+            {
+            rowNumberOfKeyboard = 3;
+            break;
+            }
+        case ELayout11x4:
+            {
+            rowNumberOfKeyboard = 4;
+            break;
+            }
+        default:
+            {
+            rowNumberOfKeyboard = 3;
+            break;
+            }
+        }
+    
+    // Compute the gap between first row key's top line and keyboard's top line
+    gapValue = keypaneRect.Rect().iTl.iY - keypadRect.Rect().iTl.iY;
+    // Compute function button's top left Y coordinate
+    rectOfButtons.iTl.iY = rectOfButtons.iTl.iY + 
+    		keypaneRect.Rect().Height() * rowNumberOfKeyboard + gapValue;
+    
+    // Compute keyboard position
+    rectOfKeypad.iBr.iY = rectOfKeypad.iTl.iY + 
+    		keypaneRect.Rect().Height() * rowNumberOfKeyboard + gapValue;
+    rectOfKeypad.iTl.iY += gapValue;
 
     //keypad
     data->iKeypad.iKaypadRect = rectOfKeypad;
@@ -375,18 +406,15 @@
 
     for ( TInt i = 0; i < aRows; i++ )
         {
-        TInt indent = ( i % 2 == 1 ) ? rowIndentWidth : 0;
         for ( TInt j = 0; j < aCols; j++ )
             {
 			TRect bound = rectXPane;
             bound.Move( j * rectXPane.Width(), i * rectXPane.Height() );
-            bound.Move( indent, 0 );
             
             data->iKeypad.iRects.AppendL( bound );
             
             TRect inner = rectXPane;
             inner.Move( j * rectXPane.Width(), i * rectXPane.Height() );
-            inner.Move( indent, 0 );        
             
             TAknLayoutText keyTextLayout; 
             keyTextLayout.LayoutText( inner, keyText );
@@ -398,7 +426,10 @@
 
     //all template rects are relative to TL of buttons row
     rectXPane = keypaneRect.Rect();
-    rectXBorder = RelativeRect( keycellRect.Rect(), rectXPane.iTl );
+    
+    // The key rect without gap
+    rectXBorder = RelativeRect( keypaneRect.Rect(), rectXPane.iTl );
+    
     rectXInner = RelativeRect( keylabelRect.Rect(), rectXPane.iTl );
     TRect rect3PicPane = RelativeRect( pic3paneRect.Rect(), rectXPane.iTl );
     rectXPane.Move( - rectXPane.iTl ); 
--- a/textinput/peninputvkbcn/ctrlsrc/peninputvkbclientarea.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputvkbcn/ctrlsrc/peninputvkbclientarea.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -952,6 +952,10 @@
     TRect compositionRect;
     TRect innerRect;
     
+	// Get composition area rect from laf
+	TRect compositionAreaFromLaf = iLafMgr->compositionLayoutData();
+	TInt GapValue = compositionAreaFromLaf.iTl.iX;
+	
     if (range == ERangeNative)
         {
         if ( layoutType == EAknFepVkbImCnZhuyin )
@@ -1004,13 +1008,17 @@
                 }
             
             compositionRect.iTl = TPoint(optionRect.iBr.iX, optionRect.iTl.iY);
-            compositionRect.SetSize(TSize(btnWidth * 3 + iCellAidGap, candidateHeight));
+            compositionRect.SetSize(TSize(btnWidth * 3 + iCellAidGap - GapValue, 
+            		candidateHeight));
             }
-	        else
-	            {
-	            compositionRect.iTl = Rect().iTl;
-	            compositionRect.SetSize(TSize(btnWidth * 3 + iCellAidGap, candidateHeight));
-	            }
+		else
+			{	
+			compositionRect.iTl = Rect().iTl;
+			// move the composition area rect with gap
+			compositionRect.iTl.iX += GapValue;
+			compositionRect.SetSize( 
+					TSize( btnWidth * 3 + iCellAidGap - GapValue * 2, candidateHeight ));
+			}
         iCompositionField->SetReady(ETrue);
         iCompositionField->Hide(EFalse);
         iCompositionField->SizeChanged(compositionRect);    
@@ -1049,6 +1057,8 @@
             }
         else
             {
+            // move the gap
+			compositionRect.iTl.iX -= GapValue;
             iVkbBoardLeftTop = TPoint(compositionRect.iTl.iX, compositionRect.iBr.iY);
             }
         }
@@ -1070,19 +1080,22 @@
     vkbCtrl->SetTextFormat( iLafMgr->KeyTextLayout() );  //Read laf 
     
     TInt tempHeightForFSQ = btnHeight;
-    if (UiLayout()->PenInputType() == EPluginInputModeFSQ )
-    	{
-        tempHeightForFSQ = btnHeight + 3;	
-    	}
+    // Modify begin
+    //if (UiLayout()->PenInputType() == EPluginInputModeFSQ )
+    //	{
+    //    tempHeightForFSQ = btnHeight + 3;	
+    //	}
     
     TPoint rangeBarRefPoint = TPoint(vkbRect.iTl.iX, vkbRect.iBr.iY);
-    rangeBarRefPoint.iY += yAxisOffset;
+    // Modify begin
+    //rangeBarRefPoint.iY += yAxisOffset;
     
     if (range != ERangeNative)
         {
         TRect shiftRect;
         shiftRect.iTl = TPoint(Rect().iTl.iX, vkbRect.iBr.iY);
-        shiftRect.iTl.iY += yAxisOffset; 
+        // Modify begin
+        //shiftRect.iTl.iY += yAxisOffset; 
         shiftRect.SetSize(TSize(btnWidth, tempHeightForFSQ)); 
         AknPenImageUtils::CalculateGraphicRect( shiftRect, innerRect );       
         ControlById( EAknFepVkbCtrlIdShiftBtn)->SetReady(ETrue);    
--- a/textinput/peninputvkbcn/inc/peninputvkbcnlafdatamgr.h	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputvkbcn/inc/peninputvkbcnlafdatamgr.h	Tue Sep 14 21:59:06 2010 +0300
@@ -171,6 +171,11 @@
 	* LAF data for tooltip box
 	*/
 	TPeninputCnTooltipBoxLayoutData iTooltipBox;
+	
+	/*
+	* LAF data for composition area
+	*/
+	TRect iCompositionRect;
 	};	
 
 class MPeninputCnLafDataBase
@@ -198,6 +203,14 @@
 	const CPeninputCnQwtLayoutDataInfo& QwtLayoutData() const;
 	
 	/*
+	* Get layout rect for composition area
+	*
+	* @param none 
+	* @return rect of composition area
+	*/
+	const TRect& compositionLayoutData() const;
+	
+	/*
 	* Return layout data for candidate list;
 	*
 	* @return The layout data for candidate list
@@ -432,6 +445,15 @@
 	* @return The layout data for tooltip box	
 	*/	
 	const TPeninputCnTooltipBoxLayoutData& TooltipBoxLayoutData() const;
+	
+	/*
+	* Get layout rect for composition area
+	*
+	* @param none 
+	* @return rect of composition area
+	*/
+	const TRect& compositionLayoutData() const;
+	
 protected:
 
 	/**
--- a/textinput/peninputvkbcn/src/peninputvkbcnlafdatamgr.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/peninputvkbcn/src/peninputvkbcnlafdatamgr.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -235,6 +235,17 @@
 	}
 	
 // ---------------------------------------------------------------------------
+// CPeninputCnGenericVkbLafMgr::compositionLayoutData
+// (other items were commented in a header)
+// ---------------------------------------------------------------------------
+//
+const TRect& CPeninputCnGenericVkbLafMgr::compositionLayoutData() const
+	{
+	ASSERT(iLafData);
+	return iLafData->compositionLayoutData();
+	}
+
+// ---------------------------------------------------------------------------
 // CPeninputCnGenericVkbLafMgr::ICFRect
 // (other items were commented in a header)
 // ---------------------------------------------------------------------------
@@ -676,7 +687,18 @@
 	ASSERT( IsValid() );
 	return iLayoutDataInfo[iLayoutType]->iKeypad;
 	}
-	
+
+// ---------------------------------------------------------------------------
+// MPeninputCnLafDataCommon::compositionLayoutData()
+// (other items were commented in a header)
+// ---------------------------------------------------------------------------
+//	
+const TRect& MPeninputCnLafDataCommon::compositionLayoutData() const
+	{
+	ASSERT( IsValid());
+	return iLayoutDataInfo[iLayoutType]->iCompositionRect;
+	}
+
 // ---------------------------------------------------------------------------
 // CPeninputLafDataCommon::RangbarLayoutData(TInt aRangbarID)
 // (other items were commented in a header)
@@ -855,6 +877,13 @@
 		aDataInfo.iRightButton.iInnerRect = cellBtnRect.Rect();		
 		}
 	
+	// Read composition area laf data
+    TAknWindowLineLayout compositionWindowLineLayout = 
+    		AknLayoutScalable_Avkon::vkb2_top_candi_pane(0).LayoutLine();
+    TAknLayoutRect compositionLayoutRect;
+    compositionLayoutRect.LayoutRect( toppaneRect.Rect(), compositionWindowLineLayout );
+    aDataInfo.iCompositionRect = compositionLayoutRect.Rect();
+	
 	// bottom pane
 	const TInt VKBParamBottom2Range[] = { 6, 8, 8 };
 	const TInt FSQParamBottom2Range[] = { 0, 2, 4 };
--- a/textinput/ptienginev2/inc/PtiEngineImpl.h	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/ptienginev2/inc/PtiEngineImpl.h	Tue Sep 14 21:59:06 2010 +0300
@@ -233,6 +233,9 @@
         void  SearchKeySequenceInSecLang(TPtrC aIn, TDes8& aOut);
 #endif // FF_DUAL_LANGUAGE_SUPPORT        
         TBool IsCurrentCoreSupportCaseInfo();
+        void IsGroupUnicodeExist(TPtiKey aKey, TDes& aResult, TInt aPosition);
+        TBool MapAgainst(TInt aKey, TInt aMode, TInt16 aAgainst, TInt aCase);
+        TInt ScanCodeForCharacter( TUint aChar, TPtiTextCase& aCase );
 	private:	
 	    /*
 	    * Pointer to PtiEngine front end.
--- a/textinput/ptienginev2/src/PtiEngineImpl.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/ptienginev2/src/PtiEngineImpl.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -131,6 +131,12 @@
 const TInt16 KStrokeQuestionValue = 0x003f;
 const TInt16 KStrokeUnicode = 0x2461;
 const TInt16 KZhuyinIndicator = 0x2462;
+const TText KZhuyinTone2 = 0x02CA; // qwerty key6
+const TText KZhuyinTone3 = 0x02C7; // qwerty key3
+const TText KZhuyinTone4 = 0x02CB; // qwerty key4
+const TText KZhuyinTone5 = 0x02D9; // qwerty key7
+static const TUint KShortCombine = 0xF010;
+const TInt KMaxMapping = 10;
 
 // Local method declarations.
 LOCAL_C TInt RemapVietnameseAccentedCharacter(TUint16 aChr);
@@ -763,6 +769,29 @@
 	return KErrNoSuitableCore;
 	}
 
+// ---------------------------------------------------------------------------
+// Group Unicode is that kind of mapping which one visible character with more 
+// than one unicode submitted.
+// 
+// ---------------------------------------------------------------------------
+//
+void CPtiEngineImpl::IsGroupUnicodeExist(TPtiKey aKey, TDes& aResult, TInt aPosition)
+    {
+    TBuf<5> keyMappings;    
+    MappingDataForKey( (TPtiKey)aKey, keyMappings, Case());
+    if(keyMappings.Length() > 0 && keyMappings.Locate(KShortCombine) == aPosition )
+        {
+        for(TInt i = 0; i < keyMappings.Length(); i++)
+            {
+            aResult.Append(keyMappings[i]);
+            }
+        }
+    else
+        {
+        aResult.Append(aKey);
+        }    
+    }
+
 		
 // ---------------------------------------------------------------------------
 // CPtiEngineImpl::AppendKeyPress
@@ -849,7 +878,24 @@
 			    }
 			
 			// Forward to core object
-			Core()->AppendKeyPress(aKey);
+			TBuf<KMaxMapping> mappings;
+			IsGroupUnicodeExist(aKey, mappings, 0);
+			if(mappings.Length() == 1)
+			    {
+				Core()->AppendKeyPress(aKey);
+			    }
+			else
+			    {
+                for(TInt i = 0; i < mappings.Length(); i++)
+                    {
+                    TPtiTextCase retCase, oriCase;
+                    retCase = oriCase = Case();
+                    TPtiKey key = (TPtiKey)ScanCodeForCharacter(mappings[i], retCase);
+                    SetCase(retCase);
+                    Core()->AppendKeyPress(key);
+                    SetCase(oriCase); 
+                    }
+			    }
 			
 			if(KeyboardType() == EPtiKeyboardHalfQwerty && aKey == EStdKeyFullStop)
 			    {
@@ -987,6 +1033,60 @@
 	return iTextBuffer;
 	}
 
+TBool CPtiEngineImpl::MapAgainst(TInt aKey, TInt aMode, TInt16 aAgainst, TInt aCase)
+    {
+    SetInputMode((TPtiEngineInputMode)aMode);
+    TBuf<KMaxName> data;
+    MappingDataForKey((TPtiKey)aKey, data, (TPtiTextCase)aCase);
+    if(data.Length() > 0)
+        {
+        return (data[0] == aAgainst);                
+        }
+    return EFalse;        
+    }
+TInt CPtiEngineImpl::ScanCodeForCharacter( TUint aChar, TPtiTextCase& aCase )
+    {
+#ifdef RD_INTELLIGENT_TEXT_INPUT
+    CPtiCoreLanguage *lang = static_cast<CPtiCoreLanguage*>( CurrentLanguage() );
+    MPtiKeyMappings* keymapping = lang->GetQwertyKeymappings();
+    if ( keymapping )
+        {
+        TPtiEngineInputMode oldInputMode = InputMode();
+        SetInputMode( EPtiEngineQwertyPredictive );
+        TInt retKey = keymapping->KeyForCharacter( (TUint16)aChar );
+        if(MapAgainst(retKey, EPtiEngineQwertyPredictive, aChar, EPtiCaseLower))
+            {
+            aCase = EPtiCaseLower;
+            }
+        else if(MapAgainst(retKey, EPtiEngineQwertyPredictive, aChar, EPtiCaseUpper))
+            {
+            aCase = EPtiCaseUpper;
+            }
+        else if(MapAgainst(retKey, EPtiEngineQwertyPredictive, aChar, EPtiCaseFnLower))
+            {
+            aCase = EPtiCaseFnLower;
+            }
+        else if(MapAgainst(retKey, EPtiEngineQwertyPredictive, aChar, EPtiCaseFnUpper))
+            {
+            aCase = EPtiCaseFnUpper;
+            }
+        else
+            {
+            }
+        SetInputMode( oldInputMode );
+#if defined(__WINS__)
+    if (retKey == EPtiKeyQwertyPlus)
+        {
+        retKey = EStdKeyNkpPlus;
+        }
+#endif
+        return retKey;
+        }
+    return EPtiKeyNone;
+#else
+    return EPtiKeyNone;
+#endif // RD_INTELLIGENT_TEXT_INPUT
+    }
 
 // ---------------------------------------------------------------------------
 // CPtiEngineImpl::DeleteKeyPress
@@ -1056,7 +1156,9 @@
 TPtrC CPtiEngineImpl::RedirectKeyForChineseQwerty(TPtiKey aKey, TBool& aRedirected)
 	{
 	aRedirected = EFalse;
-    TPtiKeyboardType kbdType = KeyboardType();	
+    TPtiKeyboardType kbdType = KeyboardType();
+	TBuf<KMaxName> data;
+	TInt key;
     
 	switch (iInputMode)
 		{
@@ -1112,47 +1214,48 @@
              if(EPtiKeyboardQwerty4x10 == keyboardType ||
                      EPtiKeyboardQwerty3x11 == keyboardType )
                  {
-                TBuf<KMaxName> lowerdata;
                  TInt StrokeUnicodePosition =0;
-                 MappingDataForKey((TPtiKey)aKey, lowerdata, EPtiCaseLower);  
-                 if(lowerdata.Length()>0)
+                 MappingDataForKey((TPtiKey)aKey, data, EPtiCaseLower);  
+                 if(data.Length()>0)
                          {
-                         for(TInt i=0;i<lowerdata.Length();i++)
+                         for(TInt i=0;i<data.Length();i++)
                              {
-                             if(lowerdata[i]==KStrokeUnicode)
+                             if(data[i]==KStrokeUnicode)
                                  {
                                  StrokeUnicodePosition = i + 1;
                                  break;
                             }
+                     if(data[0] == KZhuyinTone2 ||
+                        data[0] == KZhuyinTone3 ||
+                        data[0] == KZhuyinTone4 ||
+                        data[0] == KZhuyinTone5 )
+                         {
+                         return TPtrC();
+                         }
                         }
                     }
-                if (lowerdata.Length() > StrokeUnicodePosition && iCase
+                if (data.Length() > StrokeUnicodePosition && iCase
                         == EPtiCaseLower)
                     {
-                    if (lowerdata[StrokeUnicodePosition]
+                    if (data[StrokeUnicodePosition]
                             == KStrokeHorizontalValue
-                            || lowerdata[StrokeUnicodePosition]
+                            || data[StrokeUnicodePosition]
                                     == KStrokeVerticalValue
-                            || lowerdata[StrokeUnicodePosition]
+                            || data[StrokeUnicodePosition]
                                     == KStrokeDownToLeftValue
-                            || lowerdata[StrokeUnicodePosition]
+                            || data[StrokeUnicodePosition]
                                     == KStrokeDownToRightValue
-                            || lowerdata[StrokeUnicodePosition]
+                            || data[StrokeUnicodePosition]
                                     == KStrokeBendingValue
-                            || lowerdata[StrokeUnicodePosition]
+                            || data[StrokeUnicodePosition]
                                     == KStrokeQuestionValue)
 
                         {
                         return TPtrC();
                         }
                     }
-                 if (iCase == EPtiCaseLower && (aKey == EPtiKeyQwertySpace
-                        || aKey == EPtiKeyQwertyChr || aKey
-                        == EPtiKeyQwertyApostrophe))
-                    {
-                    return TPtrC();
-                    }
-                 if(iCase == EPtiCaseLower && aKey == EPtiKeyQwertySpace)
+                 
+                 if(iCase == EPtiCaseLower && (aKey == EPtiKeyQwertySpace || aKey == EPtiKeyQwertyZ))
                      {
                      return TPtrC();
                      }
@@ -1219,8 +1322,14 @@
 		case EPtiEngineNormalCangjieQwerty:
 		case EPtiEngineEasyCangjieQwerty:
 		case EPtiEngineAdvCangjieQwerty:
+            MappingDataForKey((TPtiKey)aKey, data, EPtiCaseUpper);
+            key = aKey;
+            if(data.Length() > 0)
+                {
+                key = (TPtiKey)data[0];
+                }
 			 if ((iCase == EPtiCaseLower) &&
-				 (aKey >= EPtiKeyQwertyA) && (aKey <= EPtiKeyQwertyY))
+				 (key >= EPtiKeyQwertyA) && (key <= EPtiKeyQwertyY))
 			    {
 			    return TPtrC();
 			    }
@@ -1247,19 +1356,18 @@
 		     else if(EPtiKeyboardQwerty4x10 == kbdType ||
 		            EPtiKeyboardQwerty3x11 == kbdType  )
 		        {
-		        TBuf<KMaxName> lowerdata;
-                TInt i;
-                MappingDataForKey((TPtiKey) aKey, lowerdata, EPtiCaseLower);
-                if (lowerdata.Length() > 0)
+                MappingDataForKey((TPtiKey) aKey, data, EPtiCaseLower);
+                if (data.Length() > 0)
                     {
-                    for ( i = 0; i < lowerdata.Length(); i++)
+					TInt i;
+                    for ( i = 0; i < data.Length(); i++)
                         {
-                        if (lowerdata[i] == KZhuyinIndicator)
+                        if (data[i] == KZhuyinIndicator)
                             {
                             break;
                             }
                         }
-                    if(i!=lowerdata.Length() && iCase == EPtiCaseLower )
+                    if(i!=data.Length() && iCase == EPtiCaseLower )
                         {
                         return TPtrC();
                         }
@@ -3223,6 +3331,7 @@
 		     	 CPtiQwertyKeyMappings* maps = static_cast<CPtiQwertyKeyMappings*>(iCurrentLanguage->GetQwertyKeymappings());
 				 if( maps != NULL )
 				     {
+                     maps->SetKeyboardType(KeyboardType());
 		     	     maps->GetDataForKey(aKey, aResult, aCase);
 				     }
 				 }     			
--- a/textinput/ptienginev2/src/PtiKeyMapData.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/ptienginev2/src/PtiKeyMapData.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -43,7 +43,7 @@
 	implArray->Close();
 	}
 
-const TInt KNumItemsPerDeadKeyDataRow = 6;
+
 
 //
 // CPtiKeyMapData
@@ -211,10 +211,10 @@
 		    {
 		    if (data[0] == index)
 			    {
-			    data++;
-			    return TPtrC(data, KNumItemsPerDeadKeyDataRow - 1);
+			    data += 2;
+			    return TPtrC(data, *(data - 1));
 			    }
-		    data += KNumItemsPerDeadKeyDataRow;
+		    data += (data[1] + 2);
 		    }
         }
 	
--- a/textinput/ptienginev2/src/PtiKeyMappings.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/ptienginev2/src/PtiKeyMappings.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -19,6 +19,7 @@
 #include "PtiKeyMappings.h"
 #include <PtiKeyMapData.h>
 
+
 // CONSTANTS
 #ifdef _DEBUG
 _LIT(KPtiNoKeyMapDataPanic, "PtiEngine: No ITU-T keymap data set.");
--- a/textinput/ptienginev2/src/Ptiqwertykeymappings.cpp	Wed Sep 01 12:23:33 2010 +0100
+++ b/textinput/ptienginev2/src/Ptiqwertykeymappings.cpp	Tue Sep 14 21:59:06 2010 +0300
@@ -80,6 +80,7 @@
     {
     EPtiKeyQwertyS, EPtiKeyQwertyF, EPtiKeyQwertyR, EPtiKeyQwertyX, EPtiKeyQwertyJ	
     };
+const TUint16 KShortCombine = 0xF010;
     
     
 //
@@ -540,6 +541,23 @@
 // 
 TUint16 CPtiQwertyKeyMappings::GetCharForMode(TPtiEngineInputMode aMode, TPtrC aChars, TBool aSkipFirst)
 	{
+    if( DoesModeCharMatchToInputMode(KPtiPinyinMarker, aMode) ||
+        DoesModeCharMatchToInputMode(KPtiStrokeMarker, aMode) ||
+        DoesModeCharMatchToInputMode(KPtiZhuyinMarker, aMode) ||
+        DoesModeCharMatchToInputMode(KPtiCangjieMarker, aMode))
+        {
+        for (TInt i = 0; i < aChars.Length(); i++)
+            {
+            if (DoesModeCharMatchToInputMode(aChars[i], aMode))
+                {
+                if (i + 1 >= aChars.Length())
+                    {
+                    return 0;
+                    }
+                return aChars[i + 1];       
+                }
+            }
+        }   
 	for (TInt i = 0; i < aChars.Length(); i++)
 		{
 		if (!IsModeControlChar(aChars[i]))
@@ -549,15 +567,14 @@
 				iCurrentChar++;				
 				continue;	
 				}
+			if(aChars[i] != KShortCombine)
+			    {
 			return aChars[i];
 			}
-		if (DoesModeCharMatchToInputMode(aChars[i], aMode))
-			{
-			if (i + 1 >= aChars.Length())
+			else
 				{
 				return 0;
 				}
-			return aChars[i + 1];		
 			}
 		i++;   // Wrong mode, skip char
 		}
@@ -604,7 +621,13 @@
 		if (key != EPtiKeyNone)
 			{
 			TPtrC keyData = DataForKeyLocal(key, textCase, EPtiEngineQwerty);
-			if (keyData.Locate(aChar) != KErrNotFound)
+			TInt indexOfSpecialMark = keyData.Locate(KShortCombine);
+            TInt indexOfChar = keyData.Locate(aChar);
+            if (indexOfSpecialMark != KErrNotFound && indexOfChar != KErrNotFound && indexOfChar > indexOfSpecialMark)
+                {
+                continue;
+                }
+            else if ( indexOfChar != KErrNotFound)
 				{
 				return key;
 				}