From e899229cdeb0f78d274ad4b83c91585b778d37c1 Mon Sep 17 00:00:00 2001 From: Brad Hefta-Gaub Date: Sun, 1 Nov 2015 09:55:30 -0800 Subject: [PATCH] tweaks to how VrMenu is shown --- interface/resources/controllers/keyboardMouse.json | 3 ++- interface/src/Application.cpp | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/interface/resources/controllers/keyboardMouse.json b/interface/resources/controllers/keyboardMouse.json index 8af6b1dc98..9c3ba79d76 100644 --- a/interface/resources/controllers/keyboardMouse.json +++ b/interface/resources/controllers/keyboardMouse.json @@ -81,6 +81,7 @@ { "from": "Keyboard.Space", "to": "Actions.SHIFT" }, { "from": "Keyboard.R", "to": "Actions.ACTION1" }, - { "from": "Keyboard.T", "to": "Actions.ACTION2" } + { "from": "Keyboard.T", "to": "Actions.ACTION2" }, + { "from": "Keyboard.RightMouseClick", "to": "Actions.ContextMenu" } ] } diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index dc2eee000d..22f61a12e0 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -635,6 +635,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : DependencyManager::get()->toggleMute(); } else if (action == controller::toInt(controller::Action::CYCLE_CAMERA)) { cycleCamera(); + } else if (action == controller::toInt(controller::Action::CONTEXT_MENU)) { + VrMenu::toggle(); // show context menu even on non-stereo displays } } }); @@ -1789,9 +1791,7 @@ void Application::keyPressEvent(QKeyEvent* event) { void Application::keyReleaseEvent(QKeyEvent* event) { if (event->key() == Qt::Key_Alt && _altPressed && hasFocus()) { - if (getActiveDisplayPlugin()->isStereo()) { - VrMenu::toggle(); - } + VrMenu::toggle(); // show context menu even on non-stereo displays } _keysPressed.remove(event->key());