| 893 | } |
| 894 | |
| 895 | bool LfoEditor::keyPressed(const juce::KeyPress& key) |
| 896 | { |
| 897 | if (key.getModifiers().isCommandDown()) // Command for macOS, Ctrl for Windows/Linux |
| 898 | { |
| 899 | if (key.getTextCharacter() == 'c' || key.getTextCharacter() == 'C') |
| 900 | { |
| 901 | copyShape(); |
| 902 | return true; |
| 903 | } |
| 904 | |
| 905 | if (key.getTextCharacter() == 'v' || key.getTextCharacter() == 'V') |
| 906 | { |
| 907 | pasteShape(); |
| 908 | if (onDataChanged) |
| 909 | onDataChanged(activeLfoData); |
| 910 | return true; |
| 911 | } |
| 912 | |
| 913 | if (key.getTextCharacter() == 'a' || key.getTextCharacter() == 'A') |
| 914 | { |
| 915 | selectAllPoints(); |
| 916 | return true; |
| 917 | } |
| 918 | } |
| 919 | |
| 920 | if (! selectedPointIndices.empty() && (key.isKeyCurrentlyDown(juce::KeyPress::deleteKey) || key.isKeyCurrentlyDown(juce::KeyPress::backspaceKey))) |
| 921 | { |
| 922 | deleteSelectedPoints(); |
| 923 | if (onDataChanged) |
| 924 | onDataChanged(activeLfoData); |
| 925 | return true; |
| 926 | } |
| 927 | return false; |
| 928 | } |
| 929 | |
| 930 | void LfoEditor::deleteSelectedPoints() |
| 931 | { |
nothing calls this directly
no outgoing calls
no test coverage detected