diff --git a/src/surge-xt/gui/SurgeGUIEditor.cpp b/src/surge-xt/gui/SurgeGUIEditor.cpp index 50184279b03..3bad9ab47d2 100644 --- a/src/surge-xt/gui/SurgeGUIEditor.cpp +++ b/src/surge-xt/gui/SurgeGUIEditor.cpp @@ -6804,6 +6804,8 @@ void SurgeGUIEditor::setupKeymapManager() // TODO: FIX SCENE ASSUMPTION keyMapManager->addBinding(Surge::GUI::TOGGLE_SCENE, {keymap_t::Modifiers::ALT, (int)'S'}); + keyMapManager->addBinding(Surge::GUI::TOGGLE_MODULATOR_ARM, + {keymap_t::Modifiers::ALT, (int)'A'}); #if WINDOWS keyMapManager->addBinding(Surge::GUI::TOGGLE_DEBUG_CONSOLE, @@ -6978,6 +6980,12 @@ bool SurgeGUIEditor::keyPressed(const juce::KeyPress &key, juce::Component *orig return true; } + case Surge::GUI::TOGGLE_MODULATOR_ARM: + { + toggle_mod_editing(); + return true; + } + #if WINDOWS case Surge::GUI::TOGGLE_DEBUG_CONSOLE: Surge::Debug::toggleConsole(); diff --git a/src/surge-xt/gui/SurgeGUIEditorKeyboardActions.h b/src/surge-xt/gui/SurgeGUIEditorKeyboardActions.h index 424dfd2e769..b29306e1f1f 100644 --- a/src/surge-xt/gui/SurgeGUIEditorKeyboardActions.h +++ b/src/surge-xt/gui/SurgeGUIEditorKeyboardActions.h @@ -44,6 +44,7 @@ enum KeyboardActions // TODO: FIX SCENE ASSUMPTION TOGGLE_SCENE, + TOGGLE_MODULATOR_ARM, #if WINDOWS TOGGLE_DEBUG_CONSOLE, @@ -108,6 +109,8 @@ inline std::string keyboardActionName(KeyboardActions a) // TODO: FIX SCENE ASSUMPTION case TOGGLE_SCENE: return "TOGGLE_SCENE"; + case TOGGLE_MODULATOR_ARM: + return "TOGGLE_MODULATOR_ARM"; #if WINDOWS case TOGGLE_DEBUG_CONSOLE: @@ -213,6 +216,10 @@ inline std::string keyboardActionDescription(KeyboardActions a) desc = "Toggle Scene A/B"; break; + case TOGGLE_MODULATOR_ARM: + desc = "Toggle Modulator Armed State"; + break; + #if WINDOWS case TOGGLE_DEBUG_CONSOLE: desc = "Debug Console"; diff --git a/src/surge-xt/gui/widgets/ModulationSourceButton.cpp b/src/surge-xt/gui/widgets/ModulationSourceButton.cpp index 11eccb61466..a763198b240 100644 --- a/src/surge-xt/gui/widgets/ModulationSourceButton.cpp +++ b/src/surge-xt/gui/widgets/ModulationSourceButton.cpp @@ -411,6 +411,11 @@ void ModulationSourceButton::buildHamburgerMenu(juce::PopupMenu &menu, void ModulationSourceButton::mouseDown(const juce::MouseEvent &event) { + if (forwardedMainFrameMouseDowns(event)) + { + return; + } + mouseMode = CLICK; everDragged = false; mouseDownLocation = event.position;