summaryrefslogtreecommitdiffhomepage
path: root/FaceTrackNoIR/FaceApp.cpp
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2010-05-28 18:48:28 +0000
committerWim Vriend <facetracknoir@gmail.com>2010-05-28 18:48:28 +0000
commit88f347a6160c1f1b79840c6489fb963a4b6a8cad (patch)
treead116bad81bb1d80412924e54d941861b574d232 /FaceTrackNoIR/FaceApp.cpp
parenta8f2a29dcc5fac905ef9a1d2305903cbb74b6b7c (diff)
WVR: Begin implementing Global HotKey and Threshold over movement-values.
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@2 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FaceTrackNoIR/FaceApp.cpp')
-rw-r--r--FaceTrackNoIR/FaceApp.cpp28
1 files changed, 26 insertions, 2 deletions
diff --git a/FaceTrackNoIR/FaceApp.cpp b/FaceTrackNoIR/FaceApp.cpp
index b993c5cf..d21360d3 100644
--- a/FaceTrackNoIR/FaceApp.cpp
+++ b/FaceTrackNoIR/FaceApp.cpp
@@ -16,7 +16,20 @@ bool FaceApp::winEventFilter( MSG * msg, long * result )
mainWindow->getGameProgramName();
}
}
-
+
+ if (msgType == WM_HOTKEY) {
+ switch ( msg->wParam ) {
+ case 777:
+ qDebug() << "FaceApp::winEventFilter says: HOME pressed";
+ break;
+ case 778:
+ qDebug() << "FaceApp::winEventFilter says: END pressed";
+ break;
+ default:
+ qDebug() << "FaceApp::winEventFilter says: unknown HotKey pressed";
+ break;
+ }
+ }
return( false );
}
@@ -27,7 +40,18 @@ void FaceApp::SetupEventFilter( FaceTrackNoIR *window ) {
mainWindow = window;
msgID_FTClient = RegisterWindowMessageA ( FT_PROGRAMID );
-
qDebug() << "FaceApp::SetupEventFilter says: Message ID =" << msgID_FTClient;
+ if ( RegisterHotKey( window->winId(), 777, MOD_WIN, VK_HOME ) ) {
+ qDebug() << "FaceApp::SetupEventFilter says: RegisterHotKey HOME =" << VK_HOME;
+ }
+ if ( RegisterHotKey( window->winId(), 778, MOD_WIN, VK_END ) ) {
+ qDebug() << "FaceApp::SetupEventFilter says: RegisterHotKey END =" << VK_END;
+ }
+
+ QAbstractEventDispatcher *evtdis = QAbstractEventDispatcher::instance();
+ if (evtdis != NULL) {
+ qDebug() << "FaceApp::SetupEventFilter says: EventDispatcher found!";
+ }
+
} \ No newline at end of file