From 07c71cbadbc01dfd9a756b1f5b1e17b48d7179b3 Mon Sep 17 00:00:00 2001 From: PrestonB1123 Date: Thu, 11 Jul 2019 12:05:15 -0700 Subject: [PATCH] disabled P shortcut and re-enabled in metaverse --- interface/src/Application.cpp | 21 ------------------- .../keyboardShortcuts/keyboardShortcuts.js | 8 +++++++ 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index b59fd223ba..a6f7e63247 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -4429,27 +4429,6 @@ void Application::keyPressEvent(QKeyEvent* event) { } break; - case Qt::Key_P: { - if (!isShifted && !isMeta && !isOption && !event->isAutoRepeat()) { - AudioInjectorOptions options; - options.localOnly = true; - options.positionSet = false; // system sound - options.stereo = true; - - Setting::Handle notificationSounds{ MenuOption::NotificationSounds, true }; - Setting::Handle notificationSoundSnapshot{ MenuOption::NotificationSoundsSnapshot, true }; - if (notificationSounds.get() && notificationSoundSnapshot.get()) { - if (_snapshotSoundInjector) { - DependencyManager::get()->setOptionsAndRestart(_snapshotSoundInjector, options); - } else { - _snapshotSoundInjector = DependencyManager::get()->playSound(_snapshotSound, options); - } - } - takeSnapshot(true); - } - break; - } - case Qt::Key_Apostrophe: { if (isMeta) { auto cursor = Cursor::Manager::instance().getCursor(); diff --git a/scripts/system/keyboardShortcuts/keyboardShortcuts.js b/scripts/system/keyboardShortcuts/keyboardShortcuts.js index cf3927ac2d..165928d089 100644 --- a/scripts/system/keyboardShortcuts/keyboardShortcuts.js +++ b/scripts/system/keyboardShortcuts/keyboardShortcuts.js @@ -12,11 +12,19 @@ // (function () { // BEGIN LOCAL_SCOPE + var snapActivateSound = SoundCache.getSound(Script.resourcesPath() + "sounds/snapshot/snap.wav"); function keyPressEvent(event) { if (event.text.toUpperCase() === "B" && event.isControl) { Window.openWebBrowser(); } else if (event.text.toUpperCase() === "N" && event.isControl) { Users.toggleIgnoreRadius(); + } else if (event.text.toUpperCase() === "P") { + Audio.playSound(snapActivateSound, { + position: { x: MyAvatar.position.x, y: MyAvatar.position.y, z: MyAvatar.position.z }, + localOnly: true, + volume: 0.5 + }); + Window.takeSnapshot(true); } }