Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all
Unified · Split
| @@ -1756,6 +1756,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1755 unmodified lines | ||
| 1756 | 1756 | #endif |
| 1757 | 1757 | }); |
| 1758 | 1758 | |
| 1759 | + | |
| 1759 | 1760 | // Setup the _keyboardMouseDevice, _touchscreenDevice, _touchscreenVirtualPadDevice and the user input mapper with the default bindings |
| 1760 | 1761 | userInputMapper->registerDevice(_keyboardMouseDevice->getInputDevice()); |
| 1761 | 1762 | // if the _touchscreenDevice is not supported it will not be registered |
| @@ -9162,12 +9163,15 @@ void Application::enterForeground() { · 7400 unmodified lines | ||
| 9162 | 9163 | auto nodeList = DependencyManager::get<NodeList>(); |
| 9163 | 9164 | nodeList->setSendDomainServerCheckInEnabled(true); |
| 9164 | 9165 | } |
| 9165 | −#endif | |
| 9166 | + | |
| 9166 | 9167 | |
| 9167 | 9168 | void Application::toggleAwayMode(){ |
| 9168 | − auto key = QKeyEvent(QEvent::KeyPress,Qt::Key_Escape,Qt::NoModifier); | |
| 9169 | − _keyboardMouseDevice->keyPressEvent(&key); | |
| 9170 | − qDebug()<<"QQQ_ AWAY MODE "; | |
| 9169 | + QKeyEvent event = QKeyEvent (QEvent::KeyPress, Qt::Key_Escape, Qt::NoModifier); | |
| 9170 | + QCoreApplication::sendEvent (this, &event); | |
| 9171 | 9171 | } |
| 9172 | 9172 | |
| 9173 | + | |
| 9174 | +#endif | |
| 9175 | + | |
| 9176 | + | |
| 9173 | 9177 | #include "Application.moc" |