diff --git a/CHANGELOG.md b/CHANGELOG.md index 2dd4a5c6..b440f23d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,16 @@ # Changelog -# v0.3.1 () +# v0.3.1 (29 May 2024) - issue #111 - fix program change - issue #112 - fix launchpad follow mode +- issue #115 - follow pattern is now saved on project +- issue #116 - fix F1-F5 shortcut +- issue #117 - fix curve cv problem +- issue #118 - fix file stack overflow - fix fill display +- fix stochastic reseed behaviour +- fix arp track copy pattern + # v0.3.0 (02 May 2024) - Arpeggiator Track diff --git a/src/apps/sequencer/Config.h b/src/apps/sequencer/Config.h index 381818db..c8c66b9f 100644 --- a/src/apps/sequencer/Config.h +++ b/src/apps/sequencer/Config.h @@ -22,7 +22,7 @@ #define CONFIG_ENGINE_TASK_STACK_SIZE 4096 #define CONFIG_USBH_TASK_STACK_SIZE 2048 #define CONFIG_UI_TASK_STACK_SIZE 4096 -#define CONFIG_FILE_TASK_STACK_SIZE 2048 +#define CONFIG_FILE_TASK_STACK_SIZE 4096 #define CONFIG_PROFILER_TASK_STACK_SIZE 2048 // Settings flash storage diff --git a/src/apps/sequencer/engine/CurveTrackEngine.cpp b/src/apps/sequencer/engine/CurveTrackEngine.cpp index e4f3e960..b26bd1f7 100644 --- a/src/apps/sequencer/engine/CurveTrackEngine.cpp +++ b/src/apps/sequencer/engine/CurveTrackEngine.cpp @@ -240,11 +240,14 @@ void CurveTrackEngine::updateOutput(uint32_t relativeTick, uint32_t divisor) { } bool CurveTrackEngine::isRecording() const { - return + bool val = _engine.state().recording() && _curveTrack.curveCvInput() != Types::CurveCvInput::Off; - //&& - //_model.project().selectedTrackIndex() == _track.trackIndex(); + + if (!_model.project().useMultiCvRec()) { + return val && _model.project().selectedTrackIndex() == _track.trackIndex(); + } + return val; } void CurveTrackEngine::updateRecordValue() { diff --git a/src/apps/sequencer/engine/StochasticEngine.cpp b/src/apps/sequencer/engine/StochasticEngine.cpp index 4e5fa1a1..93b4f9ad 100644 --- a/src/apps/sequencer/engine/StochasticEngine.cpp +++ b/src/apps/sequencer/engine/StochasticEngine.cpp @@ -435,7 +435,11 @@ void StochasticEngine::triggerStep(uint32_t tick, uint32_t divisor, bool forNext int sum =0; for (int i = 0; i < 12; i++) { if (sequence.step(i).gate()) { - probability.insert(probability.end(), StochasticStep(i, clamp(sequence.step(i).noteVariationProbability() + _stochasticTrack.noteProbabilityBias(), -1, StochasticSequence::NoteVariationProbability::Max))); + int prob = sequence.step(i).noteVariationProbability() + _stochasticTrack.noteProbabilityBias(); + if (sequence.step(i).noteVariationProbability()==0) { + prob = 0; + } + probability.insert(probability.end(), StochasticStep(i, clamp(prob, -1, StochasticSequence::NoteVariationProbability::Max))); } else { probability.insert(probability.end(), StochasticStep(i, 0)); } diff --git a/src/apps/sequencer/model/ArpTrack.cpp b/src/apps/sequencer/model/ArpTrack.cpp index 003559fd..7c0b593d 100644 --- a/src/apps/sequencer/model/ArpTrack.cpp +++ b/src/apps/sequencer/model/ArpTrack.cpp @@ -67,6 +67,7 @@ void ArpTrack::write(VersionedSerializedWriter &writer) const { writer.write(_noteProbabilityBias.base); writer.write(_arpeggiator); writeArray(writer, _sequences); + writer.write(_patternFollow); } void ArpTrack::read(VersionedSerializedReader &reader) { @@ -94,4 +95,5 @@ void ArpTrack::read(VersionedSerializedReader &reader) { } readArray(reader, _sequences); + reader.read(_patternFollow, ProjectVersion::Version39); } diff --git a/src/apps/sequencer/model/ClipBoard.cpp b/src/apps/sequencer/model/ClipBoard.cpp index 38ce2b36..5e78ef9a 100644 --- a/src/apps/sequencer/model/ClipBoard.cpp +++ b/src/apps/sequencer/model/ClipBoard.cpp @@ -109,6 +109,9 @@ void ClipBoard::copyPattern(int patternIndex) { case Track::TrackMode::Logic: pattern.sequences[trackIndex].data.logic = track.logicTrack().sequence(patternIndex); break; + case Track::TrackMode::Arp: + pattern.sequences[trackIndex].data.arp = track.arpTrack().sequence(patternIndex); + break; default: break; } diff --git a/src/apps/sequencer/model/CurveTrack.cpp b/src/apps/sequencer/model/CurveTrack.cpp index a073a893..2a6f6bdf 100644 --- a/src/apps/sequencer/model/CurveTrack.cpp +++ b/src/apps/sequencer/model/CurveTrack.cpp @@ -63,6 +63,7 @@ void CurveTrack::write(VersionedSerializedWriter &writer) const { writer.write(_min); writer.write(_max); writeArray(writer, _sequences); + writer.write(_patternFollow); } void CurveTrack::read(VersionedSerializedReader &reader) { @@ -79,4 +80,5 @@ void CurveTrack::read(VersionedSerializedReader &reader) { reader.read(_min, ProjectVersion::Version37); reader.read(_max, ProjectVersion::Version37); readArray(reader, _sequences); + reader.read(_patternFollow, ProjectVersion::Version39); } diff --git a/src/apps/sequencer/model/LogicTrack.cpp b/src/apps/sequencer/model/LogicTrack.cpp index 647f68d6..565c133c 100644 --- a/src/apps/sequencer/model/LogicTrack.cpp +++ b/src/apps/sequencer/model/LogicTrack.cpp @@ -74,6 +74,7 @@ void LogicTrack::write(VersionedSerializedWriter &writer) const { writer.write(_inputTrack2); writer.write(_detailedView); writeArray(writer, _sequences); + writer.write(_patternFollow); } void LogicTrack::read(VersionedSerializedReader &reader) { @@ -105,4 +106,5 @@ void LogicTrack::read(VersionedSerializedReader &reader) { } readArray(reader, _sequences); + reader.read(_patternFollow, ProjectVersion::Version39); } diff --git a/src/apps/sequencer/model/NoteTrack.cpp b/src/apps/sequencer/model/NoteTrack.cpp index 61f1da0b..24622bb3 100644 --- a/src/apps/sequencer/model/NoteTrack.cpp +++ b/src/apps/sequencer/model/NoteTrack.cpp @@ -72,6 +72,7 @@ void NoteTrack::write(VersionedSerializedWriter &writer) const { writer.write(_logicTrack); writer.write(_logicTrackInput); writeArray(writer, _sequences); + writer.write(_patternFollow); } void NoteTrack::read(VersionedSerializedReader &reader) { @@ -101,4 +102,5 @@ void NoteTrack::read(VersionedSerializedReader &reader) { } readArray(reader, _sequences); + reader.read(_patternFollow, ProjectVersion::Version39); } diff --git a/src/apps/sequencer/model/Project.cpp b/src/apps/sequencer/model/Project.cpp index 326196fe..4b1fee90 100644 --- a/src/apps/sequencer/model/Project.cpp +++ b/src/apps/sequencer/model/Project.cpp @@ -43,6 +43,7 @@ void Project::clear() { setCvGateInput(Types::CvGateInput::Off); setCurveCvInput(Types::CurveCvInput::Off); setResetCvOnStop(true); + setUseMultiCvRec(true); _clockSetup.clear(); @@ -135,6 +136,7 @@ void Project::write(VersionedSerializedWriter &writer) const { writer.write(_selectedTrackIndex); writer.write(_selectedPatternIndex); writer.write(_resetCvOnStop); + writer.write(_useMultiCv); writer.writeHash(); @@ -190,6 +192,7 @@ bool Project::read(VersionedSerializedReader &reader) { reader.read(_selectedTrackIndex); reader.read(_selectedPatternIndex); reader.read(_resetCvOnStop, ProjectVersion::Version38); + reader.read(_useMultiCv, ProjectVersion::Version39); bool success = reader.checkHash(); if (success) { diff --git a/src/apps/sequencer/model/Project.h b/src/apps/sequencer/model/Project.h index 71464da6..e702f2a2 100644 --- a/src/apps/sequencer/model/Project.h +++ b/src/apps/sequencer/model/Project.h @@ -471,6 +471,23 @@ class Project { _resetCvOnStop = enabled; } + // use multi cv recording + + bool useMultiCvRec() const { return _useMultiCv;} + + void editUseMultiCvRec(int value) { + _useMultiCv = value == 1; + } + + void printUseMultiCvRec(StringBuilder &str) const { + if (_useMultiCv) str("On"); + else str("Off"); + } + + void setUseMultiCvRec(bool enabled) { + _useMultiCv = enabled; + } + // selectedTrackIndex int selectedTrackIndex() const { return _selectedTrackIndex; } @@ -693,6 +710,7 @@ class Project { uint8_t _recordDelay; bool _resetCvOnStop; + bool _useMultiCv; int _selectedTrackIndex = 0; int _selectedPatternIndex = 0; diff --git a/src/apps/sequencer/model/ProjectVersion.h b/src/apps/sequencer/model/ProjectVersion.h index 84af8e25..acb39182 100644 --- a/src/apps/sequencer/model/ProjectVersion.h +++ b/src/apps/sequencer/model/ProjectVersion.h @@ -111,6 +111,9 @@ enum ProjectVersion { // add arp track and malekko integration Version38 = 38, + // add pattern follow + Version39 = 39, + // automatically derive latest version Last, diff --git a/src/apps/sequencer/ui/controllers/launchpad/LaunchpadController.cpp b/src/apps/sequencer/ui/controllers/launchpad/LaunchpadController.cpp index 891613e2..16824fd4 100644 --- a/src/apps/sequencer/ui/controllers/launchpad/LaunchpadController.cpp +++ b/src/apps/sequencer/ui/controllers/launchpad/LaunchpadController.cpp @@ -596,7 +596,8 @@ void LaunchpadController::sequenceButton(const Button &button, ButtonAction acti } auto &sequence = _project.selectedStochasticSequence(); sequence.step(selectedNote).toggleGate(); - sequence.step(selectedNote).setNoteOctave(selectedOctave); } + sequence.step(selectedNote).setNoteOctave(selectedOctave); + } break; } case Track::TrackMode::Arp: { diff --git a/src/apps/sequencer/ui/model/ProjectListModel.h b/src/apps/sequencer/ui/model/ProjectListModel.h index 3304925f..31f30679 100644 --- a/src/apps/sequencer/ui/model/ProjectListModel.h +++ b/src/apps/sequencer/ui/model/ProjectListModel.h @@ -82,6 +82,7 @@ class ProjectListModel : public RoutableListModel { StepsToStop, RecordDelay, ResetCvOnStop, + MultiCvRec, //CurveCvInput, Last }; @@ -104,6 +105,7 @@ class ProjectListModel : public RoutableListModel { case StepsToStop: return "Steps to stop"; case RecordDelay: return "Record Delay"; case ResetCvOnStop: return "Reset CV"; + case MultiCvRec: return "Multi CV rec"; //case CurveCvInput: return "Curve CV Input"; case Last: break; } @@ -166,6 +168,9 @@ class ProjectListModel : public RoutableListModel { case ResetCvOnStop: _project.printResetCvOnStop(str); break; + case MultiCvRec: + _project.printUseMultiCvRec(str); + break; //case CurveCvInput: // _project.printCurveCvInput(str); // break; @@ -223,6 +228,9 @@ class ProjectListModel : public RoutableListModel { case ResetCvOnStop: _project.editResetCvOnStop(value); break; + case MultiCvRec: + _project.editUseMultiCvRec(value); + break; //case CurveCvInput: // _project.editCurveCvInput(value, shift); // break; diff --git a/src/apps/sequencer/ui/pages/ArpSequenceEditPage.cpp b/src/apps/sequencer/ui/pages/ArpSequenceEditPage.cpp index ae8b9c10..e33fbbdd 100644 --- a/src/apps/sequencer/ui/pages/ArpSequenceEditPage.cpp +++ b/src/apps/sequencer/ui/pages/ArpSequenceEditPage.cpp @@ -479,7 +479,6 @@ void ArpSequenceEditPage::keyPress(KeyPressEvent &event) { auto &sequence = _project.selectedArpSequence(); auto &track = _project.selectedTrack().arpTrack(); - functionShortcuts(event); if (key.isContextMenu()) { contextShow(); diff --git a/src/apps/sequencer/ui/pages/ArpSequencePage.cpp b/src/apps/sequencer/ui/pages/ArpSequencePage.cpp index e8f91145..c52ee28b 100644 --- a/src/apps/sequencer/ui/pages/ArpSequencePage.cpp +++ b/src/apps/sequencer/ui/pages/ArpSequencePage.cpp @@ -67,7 +67,6 @@ void ArpSequencePage::updateLeds(Leds &leds) { void ArpSequencePage::keyPress(KeyPressEvent &event) { const auto &key = event.key(); - functionShortcuts(event); if (key.shiftModifier() && event.count() == 2) { saveContextShow(); diff --git a/src/apps/sequencer/ui/pages/CurveSequenceEditPage.cpp b/src/apps/sequencer/ui/pages/CurveSequenceEditPage.cpp index ff496275..fede5889 100644 --- a/src/apps/sequencer/ui/pages/CurveSequenceEditPage.cpp +++ b/src/apps/sequencer/ui/pages/CurveSequenceEditPage.cpp @@ -344,7 +344,6 @@ void CurveSequenceEditPage::keyPress(KeyPressEvent &event) { auto &sequence = _project.selectedCurveSequence(); auto &track = _project.selectedTrack().curveTrack(); - functionShortcuts(event); if (key.isContextMenu()) { contextShow(); diff --git a/src/apps/sequencer/ui/pages/CurveSequencePage.cpp b/src/apps/sequencer/ui/pages/CurveSequencePage.cpp index dd2beb86..e136a1dd 100644 --- a/src/apps/sequencer/ui/pages/CurveSequencePage.cpp +++ b/src/apps/sequencer/ui/pages/CurveSequencePage.cpp @@ -65,7 +65,6 @@ void CurveSequencePage::updateLeds(Leds &leds) { void CurveSequencePage::keyPress(KeyPressEvent &event) { const auto &key = event.key(); - functionShortcuts(event); if (key.shiftModifier() && event.count() == 2) { saveContextShow(); diff --git a/src/apps/sequencer/ui/pages/LayoutPage.cpp b/src/apps/sequencer/ui/pages/LayoutPage.cpp index 33613a35..d75300a7 100644 --- a/src/apps/sequencer/ui/pages/LayoutPage.cpp +++ b/src/apps/sequencer/ui/pages/LayoutPage.cpp @@ -35,8 +35,6 @@ void LayoutPage::draw(Canvas &canvas) { void LayoutPage::keyPress(KeyPressEvent &event) { const auto &key = event.key(); - //functionShortcuts(event); - if (key.isFunction()) { if (key.function() == 4 && _mode == Mode::TrackMode && !_trackModeListModel.sameAsProject(_project)) { _manager.pages().confirmation.show("ARE YOU SURE?", [this] (bool result) { diff --git a/src/apps/sequencer/ui/pages/LogicSequenceEditPage.cpp b/src/apps/sequencer/ui/pages/LogicSequenceEditPage.cpp index 12085d69..f2c48afe 100644 --- a/src/apps/sequencer/ui/pages/LogicSequenceEditPage.cpp +++ b/src/apps/sequencer/ui/pages/LogicSequenceEditPage.cpp @@ -399,8 +399,6 @@ void LogicSequenceEditPage::keyPress(KeyPressEvent &event) { auto &sequence = _project.selectedLogicSequence(); auto &track = _project.selectedTrack().logicTrack(); - functionShortcuts(event); - if (key.isContextMenu()) { contextShow(); event.consume(); diff --git a/src/apps/sequencer/ui/pages/LogicSequencePage.cpp b/src/apps/sequencer/ui/pages/LogicSequencePage.cpp index 475e0b86..56a45828 100644 --- a/src/apps/sequencer/ui/pages/LogicSequencePage.cpp +++ b/src/apps/sequencer/ui/pages/LogicSequencePage.cpp @@ -67,7 +67,6 @@ void LogicSequencePage::updateLeds(Leds &leds) { void LogicSequencePage::keyPress(KeyPressEvent &event) { const auto &key = event.key(); - functionShortcuts(event); if (key.shiftModifier() && event.count() == 2) { saveContextShow(); diff --git a/src/apps/sequencer/ui/pages/MidiOutputPage.cpp b/src/apps/sequencer/ui/pages/MidiOutputPage.cpp index 796f0306..e3c7b870 100644 --- a/src/apps/sequencer/ui/pages/MidiOutputPage.cpp +++ b/src/apps/sequencer/ui/pages/MidiOutputPage.cpp @@ -47,8 +47,6 @@ void MidiOutputPage::draw(Canvas &canvas) { void MidiOutputPage::keyPress(KeyPressEvent &event) { const auto &key = event.key(); - //functionShortcuts(event); - if (key.isFunction()) { switch (Function(key.function())) { case Function::Prev: diff --git a/src/apps/sequencer/ui/pages/NoteSequenceEditPage.cpp b/src/apps/sequencer/ui/pages/NoteSequenceEditPage.cpp index 79f7655b..406803e4 100644 --- a/src/apps/sequencer/ui/pages/NoteSequenceEditPage.cpp +++ b/src/apps/sequencer/ui/pages/NoteSequenceEditPage.cpp @@ -364,8 +364,6 @@ void NoteSequenceEditPage::keyPress(KeyPressEvent &event) { auto &sequence = _project.selectedNoteSequence(); auto &track = _project.selectedTrack().noteTrack(); - functionShortcuts(event); - auto &trackEngine = _engine.selectedTrackEngine().as(); if (key.isContextMenu()) { diff --git a/src/apps/sequencer/ui/pages/NoteSequencePage.cpp b/src/apps/sequencer/ui/pages/NoteSequencePage.cpp index d497957c..6de137eb 100644 --- a/src/apps/sequencer/ui/pages/NoteSequencePage.cpp +++ b/src/apps/sequencer/ui/pages/NoteSequencePage.cpp @@ -67,8 +67,6 @@ void NoteSequencePage::updateLeds(Leds &leds) { void NoteSequencePage::keyPress(KeyPressEvent &event) { const auto &key = event.key(); - functionShortcuts(event); - if (key.shiftModifier() && event.count() == 2) { saveContextShow(); event.consume(); diff --git a/src/apps/sequencer/ui/pages/OverviewPage.cpp b/src/apps/sequencer/ui/pages/OverviewPage.cpp index d7375607..dca783c7 100644 --- a/src/apps/sequencer/ui/pages/OverviewPage.cpp +++ b/src/apps/sequencer/ui/pages/OverviewPage.cpp @@ -563,8 +563,6 @@ void OverviewPage::keyUp(KeyEvent &event) { void OverviewPage::keyPress(KeyPressEvent &event) { const auto &key = event.key(); - functionShortcuts(event); - if (key.isGlobal()) { return; } diff --git a/src/apps/sequencer/ui/pages/PatternPage.cpp b/src/apps/sequencer/ui/pages/PatternPage.cpp index 64480c14..6f936e0a 100644 --- a/src/apps/sequencer/ui/pages/PatternPage.cpp +++ b/src/apps/sequencer/ui/pages/PatternPage.cpp @@ -226,8 +226,6 @@ void PatternPage::keyUp(KeyEvent &event) { void PatternPage::keyPress(KeyPressEvent &event) { const auto &key = event.key(); - - functionShortcuts(event); auto &playState = _project.playState(); diff --git a/src/apps/sequencer/ui/pages/PerformerPage.cpp b/src/apps/sequencer/ui/pages/PerformerPage.cpp index c9028986..c33a45a1 100644 --- a/src/apps/sequencer/ui/pages/PerformerPage.cpp +++ b/src/apps/sequencer/ui/pages/PerformerPage.cpp @@ -193,8 +193,6 @@ void PerformerPage::keyUp(KeyEvent &event) { void PerformerPage::keyPress(KeyPressEvent &event) { const auto &key = event.key(); - functionShortcuts(event); - auto &playState = _project.playState(); if (key.pageModifier()) { diff --git a/src/apps/sequencer/ui/pages/ProjectPage.cpp b/src/apps/sequencer/ui/pages/ProjectPage.cpp index 5c054226..3779aebc 100644 --- a/src/apps/sequencer/ui/pages/ProjectPage.cpp +++ b/src/apps/sequencer/ui/pages/ProjectPage.cpp @@ -65,8 +65,6 @@ void ProjectPage::keyPress(KeyPressEvent &event) { return; } - //functionShortcuts(event); - if (key.pageModifier()) { // easter egg if (key.is(Key::Step15)) { diff --git a/src/apps/sequencer/ui/pages/RoutingPage.cpp b/src/apps/sequencer/ui/pages/RoutingPage.cpp index 28435440..10e53261 100644 --- a/src/apps/sequencer/ui/pages/RoutingPage.cpp +++ b/src/apps/sequencer/ui/pages/RoutingPage.cpp @@ -53,8 +53,6 @@ void RoutingPage::draw(Canvas &canvas) { void RoutingPage::keyPress(KeyPressEvent &event) { const auto &key = event.key(); - //functionShortcuts(event); - if (edit() && selectedRow() == int(RouteListModel::Item::Tracks) && key.isTrack()) { _editRoute.toggleTrack(key.track()); event.consume(); diff --git a/src/apps/sequencer/ui/pages/SongPage.cpp b/src/apps/sequencer/ui/pages/SongPage.cpp index 533f218f..2dbaa7d1 100644 --- a/src/apps/sequencer/ui/pages/SongPage.cpp +++ b/src/apps/sequencer/ui/pages/SongPage.cpp @@ -218,8 +218,6 @@ void SongPage::keyPress(KeyPressEvent &event) { auto &playState = _project.playState(); uint8_t selectedTracks = pressedTrackKeys(); - functionShortcuts(event); - if (key.isContextMenu()) { contextShow(); event.consume(); diff --git a/src/apps/sequencer/ui/pages/StochasticSequenceEditPage.cpp b/src/apps/sequencer/ui/pages/StochasticSequenceEditPage.cpp index c7a20f32..2fd0e75e 100644 --- a/src/apps/sequencer/ui/pages/StochasticSequenceEditPage.cpp +++ b/src/apps/sequencer/ui/pages/StochasticSequenceEditPage.cpp @@ -386,8 +386,6 @@ void StochasticSequenceEditPage::keyPress(KeyPressEvent &event) { const auto &key = event.key(); auto &sequence = _project.selectedStochasticSequence(); - functionShortcuts(event); - if (key.isContextMenu()) { contextShow(); event.consume(); diff --git a/src/apps/sequencer/ui/pages/StochasticSequencePage.cpp b/src/apps/sequencer/ui/pages/StochasticSequencePage.cpp index 6a8e6739..87f935ae 100644 --- a/src/apps/sequencer/ui/pages/StochasticSequencePage.cpp +++ b/src/apps/sequencer/ui/pages/StochasticSequencePage.cpp @@ -53,8 +53,6 @@ void StochasticSequencePage::updateLeds(Leds &leds) { void StochasticSequencePage::keyPress(KeyPressEvent &event) { const auto &key = event.key(); - functionShortcuts(event); - if (key.isContextMenu()) { contextShow(); event.consume(); diff --git a/src/apps/sequencer/ui/pages/TrackPage.cpp b/src/apps/sequencer/ui/pages/TrackPage.cpp index 632a1851..d796f797 100644 --- a/src/apps/sequencer/ui/pages/TrackPage.cpp +++ b/src/apps/sequencer/ui/pages/TrackPage.cpp @@ -51,8 +51,6 @@ void TrackPage::updateLeds(Leds &leds) { void TrackPage::keyPress(KeyPressEvent &event) { const auto &key = event.key(); - functionShortcuts(event); - if (key.isContextMenu()) { contextShow(); event.consume(); diff --git a/src/apps/sequencer/ui/pages/UserScalePage.cpp b/src/apps/sequencer/ui/pages/UserScalePage.cpp index 636ce9f1..1d41d4fa 100644 --- a/src/apps/sequencer/ui/pages/UserScalePage.cpp +++ b/src/apps/sequencer/ui/pages/UserScalePage.cpp @@ -49,8 +49,6 @@ void UserScalePage::draw(Canvas &canvas) { void UserScalePage::keyPress(KeyPressEvent &event) { const auto &key = event.key(); - //functionShortcuts(event); - if (key.isContextMenu()) { contextShow(); event.consume();