src/hbplugins/inputmethods/touchinput/hbinputnumericqwertyhandler.cpp
changeset 2 06ff229162e9
parent 1 f7ac710697a9
--- a/src/hbplugins/inputmethods/touchinput/hbinputnumericqwertyhandler.cpp	Mon May 03 12:48:33 2010 +0300
+++ b/src/hbplugins/inputmethods/touchinput/hbinputnumericqwertyhandler.cpp	Fri May 14 16:09:54 2010 +0300
@@ -24,6 +24,7 @@
 ****************************************************************************/
 #include <hbinputmethod.h>
 #include <hbinputkeymapfactory.h>
+#include <hbinputbutton.h>
 
 #include "hbinputnumericqwertyhandler.h"
 #include "hbinputnumerichandler_p.h"
@@ -67,14 +68,18 @@
     }
 
     int buttonId = event->key();
+    if (!event->text().isEmpty()) {
+        buttonId = event->text().at(0).unicode();
+    }
+
     // currently we shift and control key are not clear as concept. So just ignoring
     // these buttons.
-    if (buttonId == Qt::Key_Shift || buttonId == Qt::Key_Control) {
+    if (buttonId == HbInputButton::ButtonKeyCodeShift || buttonId == HbInputButton::ButtonKeyCodeSymbol) {
         return false;
     }
 
     // Don't handle this
-    if (buttonId == Qt::Key_Backspace || buttonId == Qt::Key_Delete) {
+    if (buttonId == Qt::Key_Backspace || buttonId == HbInputButton::ButtonKeyCodeDelete) {
         return false;
     }