From fd0d2e8c40ca1bba07389d0f3152c9d752811c4f Mon Sep 17 00:00:00 2001 From: Mario Kruselj Date: Sat, 2 Oct 2021 23:43:52 +0200 Subject: [PATCH] Add a few new keybindings Ctrl/Cmd+S now actually works Ctrl/Cmd+F to toggle typeahead patch search Alt+F to toggle setting current patch as favorite Tagging @VincyZed for documentation purposes! --- src/surge-xt/gui/SurgeGUIEditor.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/surge-xt/gui/SurgeGUIEditor.cpp b/src/surge-xt/gui/SurgeGUIEditor.cpp index c380edcbeb8..a5548bd9f61 100644 --- a/src/surge-xt/gui/SurgeGUIEditor.cpp +++ b/src/surge-xt/gui/SurgeGUIEditor.cpp @@ -5276,14 +5276,22 @@ bool SurgeGUIEditor::keyPressed(const juce::KeyPress &key, juce::Component *orig } // store patch - // TODO: this one doesn't work for some reason. investigate why! - if (key.getModifiers().isCommandDown() && key.getTextCharacter() == 's') + if (key.getModifiers().isCommandDown() && key.getKeyCode() == 83) // 's' { showOverlay(SurgeGUIEditor::STORE_PATCH); return true; } + // toggle patch search typeahead + if (key.getModifiers().isCommandDown() && key.getKeyCode() == 70) // 'f' + { + patchSelector->isTypeaheadSearchOn = !patchSelector->isTypeaheadSearchOn; + patchSelector->toggleTypeAheadSearch(patchSelector->isTypeaheadSearchOn); + + return true; + } + // toggle tuning editor if (key.getModifiers().isAltDown() && key.getTextCharacter() == 't') { @@ -5310,6 +5318,15 @@ bool SurgeGUIEditor::keyPressed(const juce::KeyPress &key, juce::Component *orig return true; } + // toggle setting patch as favorite + if (key.getModifiers().isAltDown() && key.getTextCharacter() == 'f') + { + setPatchAsFavorite(!isPatchFavorite()); + patchSelector->setIsFavorite(isPatchFavorite()); + + return true; + } + // toggle modulation list if (key.getModifiers().isAltDown() && key.getTextCharacter() == 'm') {