Diffstat (limited to 'noncore/apps/opie-console/function_keyboard.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/function_keyboard.cpp | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/noncore/apps/opie-console/function_keyboard.cpp b/noncore/apps/opie-console/function_keyboard.cpp index a5b19c0..ac35d1c 100644 --- a/noncore/apps/opie-console/function_keyboard.cpp +++ b/noncore/apps/opie-console/function_keyboard.cpp | |||
@@ -3,2 +3,3 @@ | |||
3 | #include <qevent.h> | 3 | #include <qevent.h> |
4 | #include <qwindowsystem_qws.h> | ||
4 | #include <qapplication.h> | 5 | #include <qapplication.h> |
@@ -101,8 +102,12 @@ void FunctionKeyboard::mousePressEvent(QMouseEvent *e) { | |||
101 | FKey k = keys["r" + QString::number(pressedRow) + "c" + QString::number(pressedCol)]; | 102 | FKey k = keys["r" + QString::number(pressedRow) + "c" + QString::number(pressedCol)]; |
102 | //QWSServer::sendKeyEvent(k.getU(), k.getQ(), 0, 1, 0); | 103 | emit keyPressed(k.getU(), k.getQ(), 0, 1, 0); |
103 | //qwsServer->sendKeyEvent(k.getU(), k.getQ(), 0, 1, 0); | 104 | /* |
104 | //qwsServer->sendKeyEvent(0x41, 0, 0, 1, 0); | 105 | * |
106 | QWSServer::sendKeyEvent(k.getU(), k.getQ(), 0, 1, 0); | ||
107 | qwsServer->sendKeyEvent(k.getU(), k.getQ(), 0, 1, 0); | ||
108 | qwsServer->sendKeyEvent(0x41, 0, 0, 1, 0); | ||
105 | 109 | ||
106 | QKeyEvent ke(QEvent::KeyPress, k.getQ(), k.getU(), 0); | 110 | QKeyEvent ke(QEvent::KeyPress, k.getQ(), k.getU(), 0); |
107 | QApplication::sendEvent(this, &ke); | 111 | QApplication::sendEvent((QObject *)parent, &ke); |
112 | */ | ||
108 | 113 | ||
@@ -119,6 +124,11 @@ void FunctionKeyboard::mouseReleaseEvent(QMouseEvent *) { | |||
119 | FKey k = keys["r" + QString::number(row) + "c" + QString::number(col)]; | 124 | FKey k = keys["r" + QString::number(row) + "c" + QString::number(col)]; |
120 | //QWSServer::sendKeyEvent(k.getU(), k.getQ(), 0, 0, 0); | 125 | emit keyPressed(k.getU(), k.getQ(), 0, 0, 0); |
121 | //qwsServer->sendKeyEvent(k.getU(), k.getQ(), 0, 0, 0); | 126 | |
127 | /* | ||
128 | QWSServer::sendKeyEvent(k.getU(), k.getQ(), 0, 0, 0); | ||
129 | qwsServer->sendKeyEvent(k.getU(), k.getQ(), 0, 0, 0); | ||
130 | |||
122 | QKeyEvent ke(QEvent::KeyRelease, k.getQ(), k.getU(), 0); | 131 | QKeyEvent ke(QEvent::KeyRelease, k.getQ(), k.getU(), 0); |
123 | QApplication::sendEvent(this, &ke); | 132 | QApplication::sendEvent((QObject *)parent, &ke); |
133 | */ | ||
124 | } | 134 | } |