src/hbplugins/inputmethods/touchinput/hbinputbasic12keyhandler.cpp
changeset 23 e6ad4ef83b23
parent 21 4633027730f5
child 30 80e4d18b72f5
--- a/src/hbplugins/inputmethods/touchinput/hbinputbasic12keyhandler.cpp	Wed Aug 18 10:05:37 2010 +0300
+++ b/src/hbplugins/inputmethods/touchinput/hbinputbasic12keyhandler.cpp	Thu Sep 02 20:44:51 2010 +0300
@@ -63,15 +63,15 @@
     do {
         int currCharIndex = 0;
         mCurrentChar = 0;
-	    //This condition is to avoid get the characters mapped to Asterisk
-	    //Especially for Thai language we have mapped character to Asterisk
+        //This condition is to avoid get the characters mapped to Asterisk
+        //Especially for Thai language we have mapped character to Asterisk
         if (buttonId != HbInputButton::ButtonKeyCodeAsterisk ||
             mInputMethod->currentKeyboardType() == HbKeyboardSctEmail || 
             mInputMethod->currentKeyboardType() == HbKeyboardSctUrl || 
             mInputMethod->currentKeyboardType() == HbKeyboardSctPortrait ) {
             currCharIndex = mNumChr ;
             mCurrentChar = q->getNthCharacterInKey(mNumChr, buttonId, type);
-	    }
+        }
 
         if (mCurrentChar != 0) {
             if (focusObject->characterAllowedInEditor(mCurrentChar)) {
@@ -115,14 +115,18 @@
             mInputMethod->currentKeyboardType() != HbKeyboardSctEmail &&
             mInputMethod->currentKeyboardType() != HbKeyboardSctUrl )) {
             mLongPressHappened = true;
-            mInputMethod->selectSpecialCharacterTableMode();
+            if (HbInputSettingProxy::instance()->globalInputLanguage().language() == QLocale::Chinese) {
+                mInputMethod->switchMode(mDownKey);
+            } else {
+                mInputMethod->selectSpecialCharacterTableMode();
+            }
         } else if (mDownKey == HbInputButton::ButtonKeyCodeAsterisk &&
-			!mInputMethod->isSctModeActive() && 
-			(mInputMethod->currentKeyboardType() != HbKeyboardSctPortrait &&
+            !mInputMethod->isSctModeActive() && 
+            (mInputMethod->currentKeyboardType() != HbKeyboardSctPortrait &&
             mInputMethod->currentKeyboardType() != HbKeyboardSctUrl &&
             mInputMethod->currentKeyboardType() != HbKeyboardSctEmail )) {
             // launch the SCT keypad when long press of Asterisk key is 
-			// received in non-SCT mode
+            // received in non-SCT mode
             mLongPressHappened = true;
             mInputMethod->switchMode(mDownKey);
         } else if (mDownKey != HbInputButton::ButtonKeyCodeDelete &&
@@ -228,7 +232,7 @@
                     if( HbInputSettingProxy::instance()->globalInputLanguage() == mInputMethod->inputState().language() ||
                         HbInputSettingProxy::instance()->globalSecondaryInputLanguage() == mInputMethod->inputState().language() ||
                                                 ((HbEditorConstraintLatinAlphabetOnly | HbEditorConstraintAutoCompletingField)==focusObject->editorInterface().inputConstraints())){
-                        // in latin variants , double tap of shift key toggles the prediction status	
+                        // in latin variants , double tap of shift key toggles the prediction status    
                         // revert back to the old case as this is a double tap 
                         // (the case was changed on the single tap)
                         updateTextCase();
@@ -271,7 +275,7 @@
             return true;
         }
         // switch the keypad mode when the short key press of Asterisk key in non-SCT mode
-        // or SYM button or Alphabet button is received		
+        // or SYM button or Alphabet button is received     
         if ((buttonId == HbInputButton::ButtonKeyCodeAsterisk &&
             !mInputMethod->isSctModeActive()) || buttonId == HbInputButton::ButtonKeyCodeSymbol ||
             buttonId == HbInputButton::ButtonKeyCodeAlphabet) {