Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modulation: Keybind to Arm and Restore Middle Mouse #6550

Merged
merged 2 commits into from
Aug 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/surge-xt/gui/SurgeGUIEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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();
Expand Down
7 changes: 7 additions & 0 deletions src/surge-xt/gui/SurgeGUIEditorKeyboardActions.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ enum KeyboardActions

// TODO: FIX SCENE ASSUMPTION
TOGGLE_SCENE,
TOGGLE_MODULATOR_ARM,

#if WINDOWS
TOGGLE_DEBUG_CONSOLE,
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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";
Expand Down
5 changes: 5 additions & 0 deletions src/surge-xt/gui/widgets/ModulationSourceButton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down