src/hbplugins/inputmethods/touchinput/hbinputnumericqwertyhandler.cpp
changeset 2 06ff229162e9
parent 1 f7ac710697a9
equal deleted inserted replaced
1:f7ac710697a9 2:06ff229162e9
    22 ** Nokia at developer.feedback@nokia.com.
    22 ** Nokia at developer.feedback@nokia.com.
    23 **
    23 **
    24 ****************************************************************************/
    24 ****************************************************************************/
    25 #include <hbinputmethod.h>
    25 #include <hbinputmethod.h>
    26 #include <hbinputkeymapfactory.h>
    26 #include <hbinputkeymapfactory.h>
       
    27 #include <hbinputbutton.h>
    27 
    28 
    28 #include "hbinputnumericqwertyhandler.h"
    29 #include "hbinputnumericqwertyhandler.h"
    29 #include "hbinputnumerichandler_p.h"
    30 #include "hbinputnumerichandler_p.h"
    30 #include "hbinputabstractbase.h"
    31 #include "hbinputabstractbase.h"
    31 
    32 
    65     if (q->HbInputNumericHandler::filterEvent(event)) {
    66     if (q->HbInputNumericHandler::filterEvent(event)) {
    66         return true;
    67         return true;
    67     }
    68     }
    68 
    69 
    69     int buttonId = event->key();
    70     int buttonId = event->key();
       
    71     if (!event->text().isEmpty()) {
       
    72         buttonId = event->text().at(0).unicode();
       
    73     }
       
    74 
    70     // currently we shift and control key are not clear as concept. So just ignoring
    75     // currently we shift and control key are not clear as concept. So just ignoring
    71     // these buttons.
    76     // these buttons.
    72     if (buttonId == Qt::Key_Shift || buttonId == Qt::Key_Control) {
    77     if (buttonId == HbInputButton::ButtonKeyCodeShift || buttonId == HbInputButton::ButtonKeyCodeSymbol) {
    73         return false;
    78         return false;
    74     }
    79     }
    75 
    80 
    76     // Don't handle this
    81     // Don't handle this
    77     if (buttonId == Qt::Key_Backspace || buttonId == Qt::Key_Delete) {
    82     if (buttonId == Qt::Key_Backspace || buttonId == HbInputButton::ButtonKeyCodeDelete) {
    78         return false;
    83         return false;
    79     }
    84     }
    80 
    85 
    81     //TODO
    86     //TODO
    82     HbInputFocusObject *focusObject = 0;
    87     HbInputFocusObject *focusObject = 0;