|
@@ -106,14 +106,30 @@ void DeclarativeInputEngine::sendKeyToFocusItem(const QString& text)
|
|
|
// Qt::Key_Enter
|
|
|
QKeyEvent evEnterP(QEvent::KeyPress, Qt::Key_Enter, Qt::NoModifier);
|
|
|
QCoreApplication::sendEvent(QGuiApplication::focusObject(),&evEnterP);
|
|
|
- } else if (text == "\uf060") {
|
|
|
+ } else if (text == "\u2190") {
|
|
|
// move left
|
|
|
QKeyEvent ev(QEvent::KeyPress, Qt::Key_Left, Qt::NoModifier);
|
|
|
QCoreApplication::sendEvent(QGuiApplication::focusObject(),&ev);
|
|
|
- } else if (text == "\uf061") {
|
|
|
+ } else if (text == "\u2192") {
|
|
|
// move right
|
|
|
QKeyEvent ev(QEvent::KeyPress, Qt::Key_Right, Qt::NoModifier);
|
|
|
QCoreApplication::sendEvent(QGuiApplication::focusObject(),&ev);
|
|
|
+ } else if (text == "\u2191") {
|
|
|
+ // move up
|
|
|
+ QKeyEvent ev(QEvent::KeyPress, Qt::Key_Up, Qt::NoModifier);
|
|
|
+ QCoreApplication::sendEvent(QGuiApplication::focusObject(),&ev);
|
|
|
+ } else if (text == "\u2193") {
|
|
|
+ // move down
|
|
|
+ QKeyEvent ev(QEvent::KeyPress, Qt::Key_Down, Qt::NoModifier);
|
|
|
+ QCoreApplication::sendEvent(QGuiApplication::focusObject(),&ev);
|
|
|
+ } else if (text == "\u21a6") {
|
|
|
+ // tabulator
|
|
|
+ QKeyEvent ev(QEvent::KeyPress, Qt::Key_Tab, Qt::NoModifier);
|
|
|
+ QCoreApplication::sendEvent(QGuiApplication::focusObject(),&ev);
|
|
|
+ } else if (text == "\u21a4") {
|
|
|
+ // backtab
|
|
|
+ QKeyEvent ev(QEvent::KeyPress, Qt::Key_Backtab, Qt::NoModifier);
|
|
|
+ QCoreApplication::sendEvent(QGuiApplication::focusObject(),&ev);
|
|
|
} else {
|
|
|
|
|
|
//add some text
|