From 11493f17d0ff13d4a95da2db4ba147e64ef1224d Mon Sep 17 00:00:00 2001 From: Wim Vriend Date: Mon, 17 Sep 2012 17:54:15 +0000 Subject: Added Mouse-keys to the ShortKeys. Needs some more testing. git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@144 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb --- FaceTrackNoIR/FTNoIR_KeyboardShortcuts.ui | 217 ++++++++++++++++++++++++++---- FaceTrackNoIR/FaceTrackNoIR.cpp | 35 +++++ FaceTrackNoIR/FaceTrackNoIR.h | 1 + FaceTrackNoIR/FaceTrackNoIR.ui | 2 +- FaceTrackNoIR/tracker.cpp | 136 +++++++++++++++++-- FaceTrackNoIR/tracker.h | 6 + 6 files changed, 359 insertions(+), 38 deletions(-) (limited to 'FaceTrackNoIR') diff --git a/FaceTrackNoIR/FTNoIR_KeyboardShortcuts.ui b/FaceTrackNoIR/FTNoIR_KeyboardShortcuts.ui index 783b2a0e..021c6ce6 100644 --- a/FaceTrackNoIR/FTNoIR_KeyboardShortcuts.ui +++ b/FaceTrackNoIR/FTNoIR_KeyboardShortcuts.ui @@ -6,12 +6,12 @@ 0 0 - 558 - 415 + 672 + 438 - FaceTrackNoIR keyboard shortcuts + FaceTrackNoIR Keyboard and Mouse shortcuts @@ -28,21 +28,21 @@ - + Disables: - + When OFF: - + @@ -58,14 +58,14 @@ - + Axis Inhibitor - + @@ -78,7 +78,7 @@ - + @@ -91,7 +91,7 @@ - + @@ -104,7 +104,7 @@ - + @@ -117,7 +117,7 @@ - + @@ -130,7 +130,7 @@ - + @@ -143,7 +143,7 @@ - + @@ -156,7 +156,7 @@ - + @@ -169,7 +169,7 @@ - + @@ -185,7 +185,7 @@ - + @@ -195,7 +195,7 @@ - + @@ -205,7 +205,7 @@ - + @@ -278,7 +278,7 @@ - + @@ -320,7 +320,7 @@ - + Start/stop @@ -330,7 +330,7 @@ - + color: rgb(0, 0, 0); @@ -397,7 +397,7 @@ - + @@ -439,7 +439,7 @@ - + @@ -455,7 +455,7 @@ - + @@ -468,7 +468,7 @@ - + @@ -481,7 +481,7 @@ - + @@ -494,7 +494,7 @@ - + @@ -507,7 +507,7 @@ - + @@ -523,6 +523,165 @@ + + + + + 0 + 0 + + + + Keyboard + + + Qt::AlignCenter + + + false + + + + + + + + 0 + 0 + + + + Mouse + + + Qt::AlignCenter + + + false + + + + + + + + 90 + 0 + + + + Select Number + + + QComboBox::InsertAlphabetically + + + + + + + + 90 + 0 + + + + Select Number + + + QComboBox::InsertAlphabetically + + + + + + + + 90 + 0 + + + + Select Number + + + QComboBox::InsertAlphabetically + + + + + + + + 90 + 0 + + + + + + + + Qt::Vertical + + + + + + + Qt::Vertical + + + + + + + Qt::Vertical + + + + + + + Qt::Vertical + + + + + + + Qt::Vertical + + + + + + + Qt::Vertical + + + + + + + Qt::Vertical + + + + + + + Qt::Vertical + + + + + + + Qt::Vertical + + + diff --git a/FaceTrackNoIR/FaceTrackNoIR.cpp b/FaceTrackNoIR/FaceTrackNoIR.cpp index 9c89c13a..d4549a10 100644 --- a/FaceTrackNoIR/FaceTrackNoIR.cpp +++ b/FaceTrackNoIR/FaceTrackNoIR.cpp @@ -23,6 +23,7 @@ *********************************************************************************/ /* Modifications (last one on top): + 20120917 - WVR: Added Mouse-buttons to ShortKeys. 20120717 - WVR: FunctionConfig is now used for the Curves, instead of BezierConfig. 20120427 - WVR: The Protocol-code was already in separate DLLs, but the ListBox was still filled ´statically´. Now, a Dir() of the EXE-folder is done, to locate Protocol-DLLs. The Icons were also moved to the DLLs @@ -1530,16 +1531,19 @@ QWidget( parent , f) connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel())); connect(ui.cbxCenterKey, SIGNAL(currentIndexChanged(int)), this, SLOT(keyChanged( int ))); + connect(ui.cbxCenterMouseKey, SIGNAL(currentIndexChanged(int)), this, SLOT(keyChanged( int ))); connect(ui.chkCenterShift, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int))); connect(ui.chkCenterCtrl, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int))); connect(ui.chkCenterAlt, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int))); connect(ui.cbxGameZeroKey, SIGNAL(currentIndexChanged(int)), this, SLOT(keyChanged( int ))); + connect(ui.cbxGameZeroMouseKey, SIGNAL(currentIndexChanged(int)), this, SLOT(keyChanged( int ))); connect(ui.chkGameZeroShift, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int))); connect(ui.chkGameZeroCtrl, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int))); connect(ui.chkGameZeroAlt, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int))); connect(ui.cbxStartStopKey, SIGNAL(currentIndexChanged(int)), this, SLOT(keyChanged( int ))); + connect(ui.cbxStartStopMouseKey, SIGNAL(currentIndexChanged(int)), this, SLOT(keyChanged( int ))); connect(ui.chkStartStopShift, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int))); connect(ui.chkStartStopCtrl, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int))); connect(ui.chkStartStopAlt, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int))); @@ -1547,6 +1551,7 @@ QWidget( parent , f) connect(ui.radioSetEngineStop, SIGNAL(toggled(bool)), this, SLOT(keyChanged(bool))); connect(ui.cbxInhibitKey, SIGNAL(currentIndexChanged(int)), this, SLOT(keyChanged( int ))); + connect(ui.cbxInhibitMouseKey, SIGNAL(currentIndexChanged(int)), this, SLOT(keyChanged( int ))); connect(ui.chkInhibitShift, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int))); connect(ui.chkInhibitCtrl, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int))); connect(ui.chkInhibitAlt, SIGNAL(stateChanged(int)), this, SLOT(keyChanged(int))); @@ -1701,6 +1706,28 @@ QWidget( parent , f) ui.cbxInhibitKey->addItem(stringList.at(i)); } + // + // Clear the Lists with key-descriptions and keycodes and build the Lists + // The strings will all be added to the ListBoxes for each Shortkey + // + stringListMouse.clear(); + stringListMouse.append("NONE"); + stringListMouse.append("LEFT"); + stringListMouse.append("RIGHT"); + stringListMouse.append("MIDDLE"); + stringListMouse.append("BACK"); + stringListMouse.append("FORWARD"); + + // + // Add strings to the Listboxes. + // + for ( int i = 0; i < stringListMouse.size(); i++) { + ui.cbxCenterMouseKey->addItem(stringListMouse.at(i)); + ui.cbxGameZeroMouseKey->addItem(stringListMouse.at(i)); + ui.cbxStartStopMouseKey->addItem(stringListMouse.at(i)); + ui.cbxInhibitMouseKey->addItem(stringListMouse.at(i)); + } + // Load the settings from the current .INI-file loadSettings(); } @@ -1775,6 +1802,7 @@ int keyindex; iniFile.beginGroup ( "KB_Shortcuts" ); // Center key + ui.cbxCenterMouseKey->setCurrentIndex( iniFile.value ( "MouseKey_Center", 0 ).toInt() ); keyindex = keyList.indexOf ( iniFile.value ( "Keycode_Center", 1 ).toInt() ); if ( keyindex > 0 ) { ui.cbxCenterKey->setCurrentIndex( keyindex ); @@ -1787,6 +1815,7 @@ int keyindex; ui.chkCenterAlt->setChecked (iniFile.value ( "Alt_Center", 0 ).toBool()); // GameZero key + ui.cbxGameZeroMouseKey->setCurrentIndex( iniFile.value ( "MouseKey_GameZero", 0 ).toInt() ); keyindex = keyList.indexOf ( iniFile.value ( "Keycode_GameZero", 1 ).toInt() ); if ( keyindex > 0 ) { ui.cbxGameZeroKey->setCurrentIndex( keyindex ); @@ -1799,6 +1828,7 @@ int keyindex; ui.chkGameZeroAlt->setChecked (iniFile.value ( "Alt_GameZero", 0 ).toBool()); // Start/stop key + ui.cbxStartStopMouseKey->setCurrentIndex( iniFile.value ( "MouseKey_StartStop", 0 ).toInt() ); keyindex = keyList.indexOf ( iniFile.value ( "Keycode_StartStop", 1 ).toInt() ); if ( keyindex > 0 ) { ui.cbxStartStopKey->setCurrentIndex( keyindex ); @@ -1815,6 +1845,7 @@ int keyindex; ui.radioSetKeepTracking->setChecked(!ui.radioSetEngineStop->isChecked()); // Axis-inhibitor key + ui.cbxInhibitMouseKey->setCurrentIndex( iniFile.value ( "MouseKey_Inhibit", 0 ).toInt() ); keyindex = keyList.indexOf ( iniFile.value ( "Keycode_Inhibit", 1 ).toInt() ); if ( keyindex > 0 ) { ui.cbxInhibitKey->setCurrentIndex( keyindex ); @@ -1859,16 +1890,19 @@ void KeyboardShortcutDialog::save() { QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file) iniFile.beginGroup ( "KB_Shortcuts" ); + iniFile.setValue ( "MouseKey_Center", ui.cbxCenterMouseKey->currentIndex()); iniFile.setValue ( "Keycode_Center", keyList.at( ui.cbxCenterKey->currentIndex() ) ); iniFile.setValue ( "Shift_Center", ui.chkCenterShift->isChecked() ); iniFile.setValue ( "Ctrl_Center", ui.chkCenterCtrl->isChecked() ); iniFile.setValue ( "Alt_Center", ui.chkCenterAlt->isChecked() ); + iniFile.setValue ( "MouseKey_GameZero", ui.cbxGameZeroMouseKey->currentIndex()); iniFile.setValue ( "Keycode_GameZero", keyList.at( ui.cbxGameZeroKey->currentIndex() ) ); iniFile.setValue ( "Shift_GameZero", ui.chkGameZeroShift->isChecked() ); iniFile.setValue ( "Ctrl_GameZero", ui.chkGameZeroCtrl->isChecked() ); iniFile.setValue ( "Alt_GameZero", ui.chkGameZeroAlt->isChecked() ); + iniFile.setValue ( "MouseKey_StartStop", ui.cbxStartStopMouseKey->currentIndex()); iniFile.setValue ( "Keycode_StartStop", keyList.at( ui.cbxStartStopKey->currentIndex() ) ); iniFile.setValue ( "Shift_StartStop", ui.chkStartStopShift->isChecked() ); iniFile.setValue ( "Ctrl_StartStop", ui.chkStartStopCtrl->isChecked() ); @@ -1876,6 +1910,7 @@ void KeyboardShortcutDialog::save() { iniFile.setValue ( "SetZero", ui.radioSetZero->isChecked() ); iniFile.setValue ( "SetEngineStop", ui.radioSetEngineStop->isChecked() ); + iniFile.setValue ( "MouseKey_Inhibit", ui.cbxInhibitMouseKey->currentIndex()); iniFile.setValue ( "Keycode_Inhibit", keyList.at( ui.cbxInhibitKey->currentIndex() ) ); iniFile.setValue ( "Shift_Inhibit", ui.chkInhibitShift->isChecked() ); iniFile.setValue ( "Ctrl_Inhibit", ui.chkInhibitCtrl->isChecked() ); diff --git a/FaceTrackNoIR/FaceTrackNoIR.h b/FaceTrackNoIR/FaceTrackNoIR.h index 789fa683..d2b9cdde 100644 --- a/FaceTrackNoIR/FaceTrackNoIR.h +++ b/FaceTrackNoIR/FaceTrackNoIR.h @@ -219,6 +219,7 @@ private: FaceTrackNoIR *mainApp; QList stringList; // List of strings, that describe the keyboard-keys QList keyList; // List of keys, with the values of the keyboard-keys + QList stringListMouse; // List of strings, that describe the mouse-keys private slots: void doOK(); diff --git a/FaceTrackNoIR/FaceTrackNoIR.ui b/FaceTrackNoIR/FaceTrackNoIR.ui index e1bd7c15..bd4356c3 100644 --- a/FaceTrackNoIR/FaceTrackNoIR.ui +++ b/FaceTrackNoIR/FaceTrackNoIR.ui @@ -2188,7 +2188,7 @@ background:none; - Keyboard Shortcuts + Keyboard and Mouse Shortcuts diff --git a/FaceTrackNoIR/tracker.cpp b/FaceTrackNoIR/tracker.cpp index 3a7eb4f9..e28fd7d7 100644 --- a/FaceTrackNoIR/tracker.cpp +++ b/FaceTrackNoIR/tracker.cpp @@ -23,6 +23,7 @@ *********************************************************************************/ /* Modifications (last one on top): + 20120917 - WVR: Added Mouse-buttons to ShortKeys. 20120827 - WVR: Signal tracking = false to Curve-widget(s) when quitting run(). Also when Alternative Pitch curve is used. 20120805 - WVR: The FunctionConfig-widget is used to configure the Curves. It was tweaked some more, because the Accela filter now also uses the Curve(s). ToDo: make the ranges configurable by the user. Development on the Toradex IMU makes us realize, that @@ -102,15 +103,20 @@ THeadPoseDOF Tracker::X("X","", 50, 180); THeadPoseDOF Tracker::Y("Y","", 50, 180); THeadPoseDOF Tracker::Z("Z","", 50, 180); -TShortKey Tracker::CenterKey; // ShortKey to Center headposition -TShortKey Tracker::StartStopKey; // ShortKey to Start/stop tracking -TShortKey Tracker::InhibitKey; // ShortKey to inhibit axis while tracking -TShortKey Tracker::GameZeroKey; // ShortKey to Set Game Zero -//TShortKey Tracker::AxisReverseKey; // ShortKey to start/stop axis reverse while tracking +TShortKey Tracker::CenterKey; // ShortKey to Center headposition +TShortKey Tracker::StartStopKey; // ShortKey to Start/stop tracking +TShortKey Tracker::InhibitKey; // ShortKey to inhibit axis while tracking +TShortKey Tracker::GameZeroKey; // ShortKey to Set Game Zero +//TShortKey Tracker::AxisReverseKey; // ShortKey to start/stop axis reverse while tracking -//ITrackerPtr Tracker::pTracker; // Pointer to Tracker instance (in DLL) -IProtocolPtr Tracker::pProtocol; // Pointer to Protocol instance (in DLL) -IFilterPtr Tracker::pFilter; // Pointer to Filter instance (in DLL) +int Tracker::CenterMouseKey; // ShortKey to Center headposition +int Tracker::StartStopMouseKey; // ShortKey to Start/stop tracking +int Tracker::InhibitMouseKey; // ShortKey to inhibit axis while tracking +int Tracker::GameZeroMouseKey; // ShortKey to Set Game Zero + +//ITrackerPtr Tracker::pTracker; // Pointer to Tracker instance (in DLL) +IProtocolPtr Tracker::pProtocol; // Pointer to Protocol instance (in DLL) +IFilterPtr Tracker::pFilter; // Pointer to Filter instance (in DLL) /** constructor **/ @@ -297,14 +303,25 @@ void Tracker::setup() { /** QThread run method @override **/ void Tracker::run() { /** Direct Input variables **/ +// +// The DirectX stuff was found here: http://www.directxtutorial.com/tutorial9/e-directinput/dx9e2.aspx +// LPDIRECTINPUT8 din; // the pointer to our DirectInput interface LPDIRECTINPUTDEVICE8 dinkeyboard; // the pointer to the keyboard device +LPDIRECTINPUTDEVICE8 dinmouse; // the pointer to the mouse device BYTE keystate[256]; // the storage for the key-information +DIMOUSESTATE mousestate; // the storage for the mouse-information HRESULT retAcquire; bool lastCenterKey = false; // Remember state, to detect rising edge bool lastStartStopKey = false; bool lastInhibitKey = false; bool lastGameZeroKey = false; + +bool lastCenterMouseKey = false; // Remember state, to detect rising edge +bool lastStartStopMouseKey = false; +bool lastInhibitMouseKey = false; +bool lastGameZeroMouseKey = false; + bool waitAxisReverse = false; bool waitThroughZero = false; double actualYaw = 0.0f; @@ -343,16 +360,22 @@ T6DOF gameoutput_camera(0,0,0,0,0,0); if (din->CreateDevice(GUID_SysKeyboard, &dinkeyboard, NULL) != DI_OK) { qDebug() << "Tracker::setup CreateDevice function failed!" << GetLastError(); } + // create the mouse device + din->CreateDevice(GUID_SysMouse, &dinmouse, NULL); // set the data format to keyboard format if (dinkeyboard->SetDataFormat(&c_dfDIKeyboard) != DI_OK) { qDebug() << "Tracker::setup SetDataFormat function failed!" << GetLastError(); } + // set the data format to mouse format + dinmouse->SetDataFormat(&c_dfDIMouse); // set the control you will have over the keyboard if (dinkeyboard->SetCooperativeLevel(mainApp->winId(), DISCL_NONEXCLUSIVE | DISCL_BACKGROUND) != DI_OK) { qDebug() << "Tracker::setup SetCooperativeLevel function failed!" << GetLastError(); } + // set the control you will have over the mouse + dinmouse->SetCooperativeLevel(mainApp->winId(), DISCL_NONEXCLUSIVE | DISCL_BACKGROUND); forever { @@ -376,6 +399,76 @@ T6DOF gameoutput_camera(0,0,0,0,0,0); return; } + + // + // Check the mouse + // + // get access if we don't have it already + retAcquire = dinmouse->Acquire(); + if ( (retAcquire != DI_OK) && (retAcquire != S_FALSE) ) { + qDebug() << "Tracker::run Acquire function failed!" << GetLastError(); + } + else { + if (dinmouse->GetDeviceState(sizeof(DIMOUSESTATE), (LPVOID)&mousestate) != DI_OK) { + qDebug() << "Tracker::run GetDeviceState function failed!" << GetLastError(); + } + else { + // + // Check the state of the StartStop MouseKey + // + if ( isMouseKeyPressed( &StartStopMouseKey, &mousestate ) && (!lastStartStopMouseKey) ) { + Tracker::do_tracking = !Tracker::do_tracking; + + // + // To start tracking again and to be at '0', execute Center command too + // + if (Tracker::do_tracking) { + Tracker::confid = false; + pTracker->StartTracker( mainApp->winId() ); + } + else { + if (setEngineStop) { // Only stop engine when option is checked + pTracker->StopTracker( false ); + } + } + qDebug() << "Tracker::run() says StartStop pressed, do_tracking =" << Tracker::do_tracking; + } + lastStartStopMouseKey = isMouseKeyPressed( &StartStopMouseKey, &mousestate ); // Remember + + // + // Check the state of the Center MouseKey + // + if ( isMouseKeyPressed( &CenterMouseKey, &mousestate ) && (!lastCenterMouseKey) ) { + Tracker::do_center = true; + qDebug() << "Tracker::run() says Center MouseKey pressed"; + } + lastCenterMouseKey = isMouseKeyPressed( &CenterMouseKey, &mousestate ); // Remember + + // + // Check the state of the GameZero MouseKey + // + if ( isMouseKeyPressed( &GameZeroMouseKey, &mousestate ) && (!lastGameZeroMouseKey) ) { + Tracker::do_game_zero = true; + qDebug() << "Tracker::run() says GameZero MouseKey pressed"; + } + lastGameZeroMouseKey = isMouseKeyPressed( &GameZeroMouseKey, &mousestate ); // Remember + + // + // Check the state of the Inhibit MouseKey + // + if ( isMouseKeyPressed( &InhibitMouseKey, &mousestate ) && (!lastInhibitMouseKey) ) { + Tracker::do_inhibit = !Tracker::do_inhibit; + qDebug() << "Tracker::run() says Inhibit MouseKey pressed"; + // + // Execute Center command too, when inhibition ends. + // + if (!Tracker::do_inhibit) { + Tracker::do_center = true; + } + } + lastInhibitMouseKey = isMouseKeyPressed( &InhibitMouseKey, &mousestate ); // Remember + } + } // // Check the keyboard @@ -807,12 +900,14 @@ int sensX, sensY, sensZ; iniFile.beginGroup ( "KB_Shortcuts" ); // Center key + CenterMouseKey = iniFile.value ( "MouseKey_Center", 0 ).toInt(); CenterKey.keycode = iniFile.value ( "Keycode_Center", 0 ).toInt(); CenterKey.shift = iniFile.value ( "Shift_Center", 0 ).toBool(); CenterKey.ctrl = iniFile.value ( "Ctrl_Center", 0 ).toBool(); CenterKey.alt = iniFile.value ( "Alt_Center", 0 ).toBool(); // StartStop key + StartStopMouseKey = iniFile.value ( "MouseKey_StartStop", 0 ).toInt(); StartStopKey.keycode = iniFile.value ( "Keycode_StartStop", 0 ).toInt(); StartStopKey.shift = iniFile.value ( "Shift_StartStop", 0 ).toBool(); StartStopKey.ctrl = iniFile.value ( "Ctrl_StartStop", 0 ).toBool(); @@ -821,6 +916,7 @@ int sensX, sensY, sensZ; setEngineStop = iniFile.value ( "SetEngineStop", 1 ).toBool(); // Inhibit key + InhibitMouseKey = iniFile.value ( "MouseKey_Inhibit", 0 ).toInt(); InhibitKey.keycode = iniFile.value ( "Keycode_Inhibit", 0 ).toInt(); InhibitKey.shift = iniFile.value ( "Shift_Inhibit", 0 ).toBool(); InhibitKey.ctrl = iniFile.value ( "Ctrl_Inhibit", 0 ).toBool(); @@ -833,6 +929,7 @@ int sensX, sensY, sensZ; InhibitKey.doZ = iniFile.value ( "Inhibit_Z", 0 ).toBool(); // Game Zero key + GameZeroMouseKey = iniFile.value ( "MouseKey_GameZero", 0 ).toInt(); GameZeroKey.keycode = iniFile.value ( "Keycode_GameZero", 0 ).toInt(); GameZeroKey.shift = iniFile.value ( "Shift_GameZero", 0 ).toBool(); GameZeroKey.ctrl = iniFile.value ( "Ctrl_GameZero", 0 ).toBool(); @@ -885,3 +982,26 @@ bool alt; return false; } } + +// +// Determine if the MouseKey is pressed. +// +bool Tracker::isMouseKeyPressed( int *key, DIMOUSESTATE *mousestate ){ + + // + // If key == NONE, or invalid: ready! + // + if ((*key <= 0) || (*key > 5)) { + return false; + } + + // + // Now, check if the right key is pressed. + // + if (mousestate->rgbButtons[*key-1] & 0x80) { + return true; + } + else { + return false; + } +} diff --git a/FaceTrackNoIR/tracker.h b/FaceTrackNoIR/tracker.h index ce34f6d2..df259708 100644 --- a/FaceTrackNoIR/tracker.h +++ b/FaceTrackNoIR/tracker.h @@ -192,6 +192,11 @@ private: static TShortKey GameZeroKey; // ShortKey to Set Game Zero // static TShortKey AxisReverseKey; // ShortKey to reverse axis during tracking + static int CenterMouseKey; // ShortKey to Center headposition + static int StartStopMouseKey; // ShortKey to Start/stop tracking + static int InhibitMouseKey; // ShortKey to disable one or more axis during tracking + static int GameZeroMouseKey; // ShortKey to Set Game Zero + // Flags to start/stop/reset tracking static bool confid; // Tracker data is OK static bool do_tracking; // Start/stop tracking, using the shortkey @@ -238,6 +243,7 @@ public: QString getGameProgramName(); // Get the ProgramName from the game and display it. void loadSettings(); // Load settings from the INI-file bool isShortKeyPressed( TShortKey *key, BYTE *keystate ); + bool isMouseKeyPressed( int *key, DIMOUSESTATE *mousestate ); static bool getTrackingActive() { return do_tracking && confid; } static bool getAxisReverse() { return do_axis_reverse; } -- cgit v1.2.3