From 80d90147268092f4f354dd9897642b96802e7cec Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 27 Oct 2014 16:54:28 -0700 Subject: [PATCH] have spacebar fire an action event at center of screen --- interface/src/Application.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index b1f694671e..b54c3145e8 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1102,15 +1102,23 @@ void Application::keyPressEvent(QKeyEvent* event) { case Qt::Key_Equal: _myAvatar->resetSize(); break; + case Qt::Key_Space: { + // this starts an HFActionEvent + HFActionEvent startActionEvent(HFActionEvent::startType(), getViewportCenter()); + sendEvent(this, &startActionEvent); + + break; + } case Qt::Key_Escape: { OculusManager::abandonCalibration(); - // this fires the HFCancelEvent + // this starts the HFCancelEvent HFBackEvent startBackEvent(HFBackEvent::startType()); sendEvent(this, &startBackEvent); break; } + default: event->ignore(); break; @@ -1181,6 +1189,13 @@ void Application::keyReleaseEvent(QKeyEvent* event) { case Qt::Key_Alt: _myAvatar->clearDriveKeys(); break; + case Qt::Key_Space: { + // this ends the HFActionEvent + HFActionEvent endActionEvent(HFActionEvent::endType(), getViewportCenter()); + sendEvent(this, &endActionEvent); + + break; + } case Qt::Key_Escape: { // this ends the HFCancelEvent HFBackEvent endBackEvent(HFBackEvent::endType());