diff --git a/src/ui/form/opt/optionswindow.cpp b/src/ui/form/opt/optionswindow.cpp index b87ae3d7..26992702 100644 --- a/src/ui/form/opt/optionswindow.cpp +++ b/src/ui/form/opt/optionswindow.cpp @@ -36,10 +36,20 @@ void OptionsWindow::closeEvent(QCloseEvent *event) void OptionsWindow::keyPressEvent(QKeyEvent *event) { - if (event->key() == Qt::Key_Escape - && event->modifiers() == Qt::NoModifier - && !event->isAutoRepeat()) { - ctrl()->closeWindow(); + if (event->isAutoRepeat()) + return; + + switch (event->key()) { + case Qt::Key_Escape: // Esc + if (event->modifiers() == Qt::NoModifier) { + ctrl()->closeWindow(); + } + break; + case Qt::Key_S: // Ctrl+S + if (event->modifiers() == Qt::ControlModifier) { + ctrl()->applyChanges(); + } + break; } } diff --git a/src/ui/form/prog/programswindow.cpp b/src/ui/form/prog/programswindow.cpp index 8ac8167f..5ae3732a 100644 --- a/src/ui/form/prog/programswindow.cpp +++ b/src/ui/form/prog/programswindow.cpp @@ -74,10 +74,15 @@ void ProgramsWindow::closeEvent(QCloseEvent *event) void ProgramsWindow::keyPressEvent(QKeyEvent *event) { - if (event->key() == Qt::Key_Escape - && event->modifiers() == Qt::NoModifier - && !event->isAutoRepeat()) { - ctrl()->closeWindow(); + if (event->isAutoRepeat()) + return; + + switch (event->key()) { + case Qt::Key_Escape: // Esc + if (event->modifiers() == Qt::NoModifier) { + ctrl()->closeWindow(); + } + break; } }