summaryrefslogtreecommitdiff
authorhash <hash>2002-10-15 07:58:43 (UTC)
committer hash <hash>2002-10-15 07:58:43 (UTC)
commit31a73cafb40fffe2bbc12bb6fd0df6dc254d6646 (patch) (side-by-side diff)
tree09de028ded46d4201207e1749d83525dbffed929
parent42ed74a1af7f96c06d2310b9804dacc703e31ad9 (diff)
downloadopie-31a73cafb40fffe2bbc12bb6fd0df6dc254d6646.zip
opie-31a73cafb40fffe2bbc12bb6fd0df6dc254d6646.tar.gz
opie-31a73cafb40fffe2bbc12bb6fd0df6dc254d6646.tar.bz2
dont know if this works yet, but it should...
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/function_keyboard.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/function_keyboard.cpp b/noncore/apps/opie-console/function_keyboard.cpp
index d8ade69..a5b19c0 100644
--- a/noncore/apps/opie-console/function_keyboard.cpp
+++ b/noncore/apps/opie-console/function_keyboard.cpp
@@ -1,5 +1,6 @@
#include "function_keyboard.h"
#include <qsizepolicy.h>
-#include <qwindowsystem_qws.h>
+#include <qevent.h>
+#include <qapplication.h>
FunctionKeyboard::FunctionKeyboard(QWidget *parent) :
@@ -93,5 +94,5 @@ void FunctionKeyboard::mousePressEvent(QMouseEvent *e) {
pressedRow = e->y() / keyHeight;
- pressedCol = e->x() / keyWidth;
+ pressedCol = (int) (e->x() / keyWidth);
paintKey(pressedRow, pressedCol);
@@ -102,4 +103,8 @@ void FunctionKeyboard::mousePressEvent(QMouseEvent *e) {
//qwsServer->sendKeyEvent(k.getU(), k.getQ(), 0, 1, 0);
//qwsServer->sendKeyEvent(0x41, 0, 0, 1, 0);
+
+ QKeyEvent ke(QEvent::KeyPress, k.getQ(), k.getU(), 0);
+ QApplication::sendEvent(this, &ke);
+
}
@@ -115,4 +120,6 @@ void FunctionKeyboard::mouseReleaseEvent(QMouseEvent *) {
//QWSServer::sendKeyEvent(k.getU(), k.getQ(), 0, 0, 0);
//qwsServer->sendKeyEvent(k.getU(), k.getQ(), 0, 0, 0);
+ QKeyEvent ke(QEvent::KeyRelease, k.getQ(), k.getU(), 0);
+ QApplication::sendEvent(this, &ke);
}