--- a/src/hbplugins/inputmethods/touchinput/hbinput12keytouchkeyboard.cpp Thu Sep 02 20:44:51 2010 +0300
+++ b/src/hbplugins/inputmethods/touchinput/hbinput12keytouchkeyboard.cpp Fri Sep 17 08:32:10 2010 +0300
@@ -42,6 +42,7 @@
const int HbFirstRowIndex = 0;
const int HbSecondRowIndex = 2;
+const int HbNumberIndex = 4;
const int HbVirtual12KeyNumberOfRows = 4;
const int HbVirtual12KeyNumberOfColumns = 4;
const int HbButtonKeyCodeTable[HbVirtual12KeyNumberOfRows * HbVirtual12KeyNumberOfColumns] =
@@ -212,8 +213,9 @@
keyboardMap = mKeymap->keyboard(HbKeyboardVirtual12Key);
}
- if (labelMap && key < labelMap->keys.count()) {
- numChr = labelMap->keys.at(key)->keycode;
+ if (labelMap && key < labelMap->keys.count() &&
+ !(mOwner->focusObject() && mOwner->focusObject()->editorInterface().isNumericEditor())) {
+ numChr = keyLabel(labelMap->keys.at(key)->chars, HbNumberIndex).at(0);
}
// Fallback to normal keymappings if key labels are not present
@@ -251,7 +253,9 @@
if (labelMap && key < labelMap->keys.count()) {
firstRow = keyLabel(labelMap->keys.at(key)->chars, HbFirstRowIndex | mModifiers);
secondRow = keyLabel(labelMap->keys.at(key)->chars, HbSecondRowIndex | mModifiers);
- numChr = labelMap->keys.at(key)->keycode;
+ if (!(mOwner->focusObject() && mOwner->focusObject()->editorInterface().isNumericEditor())) {
+ numChr = keyLabel(labelMap->keys.at(key)->chars, HbNumberIndex).at(0);
+ }
}
// Fallback to normal keymappings if key labels are not present
@@ -321,7 +325,9 @@
QString Hb12KeyTouchKeyboardPrivate::keyLabel(const QStringList &labels, int index)
{
- if (index == HbFirstRowIndex && labels.count() >= 2) {
+ if (index == HbNumberIndex && labels.count() >= 1) {
+ return labels.at(0);
+ } else if (index == HbFirstRowIndex && labels.count() >= 2) {
return labels.at(1);
} else if (index == (HbFirstRowIndex | HbModifierShiftPressed) && labels.count() >= 3) {
return labels.at(2);