diff -r 4633027730f5 -r e6ad4ef83b23 src/hbplugins/inputmethods/common/hbinputmodehandler.cpp --- a/src/hbplugins/inputmethods/common/hbinputmodehandler.cpp Wed Aug 18 10:05:37 2010 +0300 +++ b/src/hbplugins/inputmethods/common/hbinputmodehandler.cpp Thu Sep 02 20:44:51 2010 +0300 @@ -49,6 +49,7 @@ Q_Q(HbInputModeHandler); mTimer = new QTimer(q); q->connect(mTimer, SIGNAL(timeout()), q, SLOT(_q_timeout())); + mTimer->setSingleShot(true); } // A virtual timeout function mode handlers should implement this slot. @@ -87,7 +88,7 @@ { allowedChars.clear(); HbInputLanguage language = mInputMethod->inputState().language(); - + if (!mKeymap) { mKeymap = HbKeymapFactory::instance()->keymap(language); } @@ -96,13 +97,13 @@ return; } QString chars = mappedKey->characters(modifiers); - // check whether current input language supports native digits. if yes, replace latin digits with native digits + // check whether current input language supports native digits. if yes, replace latin digits with native digits for (int i = 0; i < chars.length(); i++) { if (chars.at(i) >= '0' && chars.at(i) <= '9') { chars = chars.replace(chars.at(i), HbInputUtils::findFirstNumberCharacterBoundToKey(mappedKey, - language, HbInputUtils::inputDigitType(language))); - } - } + language, HbInputUtils::inputDigitType(language))); + } + } // We need to see which of the characters in keyData are allowed to the editor. // this looks like expensive operation, need to find out a better way/place to do it. HbInputFocusObject *focusedObject = mInputMethod->focusObject(); @@ -168,8 +169,8 @@ if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) { const QKeyEvent *keyEvent = static_cast(event); return filterEvent(keyEvent); - } - } + } + } return false; } @@ -272,17 +273,17 @@ if (!d->mKeymap) { d->mKeymap = HbKeymapFactory::instance()->keymap(language); } - bool isNumericEditor = d->mInputMethod->focusObject()->editorInterface().isNumericEditor(); - HbInputDigitType digitType = HbInputUtils::inputDigitType(language); - if (isNumericEditor) { - QLocale::Language systemLanguage = QLocale::system().language(); - if (language.language() != systemLanguage) { + bool isNumericEditor = d->mInputMethod->focusObject()->editorInterface().isNumericEditor(); + HbInputDigitType digitType = HbInputUtils::inputDigitType(language); + if (isNumericEditor) { + QLocale::Language systemLanguage = QLocale::system().language(); + if (language.language() != systemLanguage) { digitType = HbDigitTypeLatin; - } - } + } + } QChar numChr = HbInputUtils::findFirstNumberCharacterBoundToKey( d->mKeymap->keyForKeycode(type, key), language, digitType); - // when a number is to be entered, it should commit + // when a number is to be entered, it should commit // the previous string and then append the number to the string if (numChr != 0) { commitAndAppendString(numChr);