diff --git a/src/internal/QCodeEditor.cpp b/src/internal/QCodeEditor.cpp index 5fb0796..74dd0f1 100644 --- a/src/internal/QCodeEditor.cpp +++ b/src/internal/QCodeEditor.cpp @@ -610,7 +610,7 @@ void QCodeEditor::keyPressEvent(QKeyEvent *e) if (!completerSkip) { - if ((e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter)) + if ((e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) && e->modifiers() != Qt::NoModifier) { QKeyEvent pureEnter(QEvent::KeyPress, Qt::Key_Enter, Qt::NoModifier); if (e->modifiers() == Qt::ControlModifier) @@ -636,6 +636,11 @@ void QCodeEditor::keyPressEvent(QKeyEvent *e) } return; } + else if (e->modifiers() == Qt::ShiftModifier) + { + keyPressEvent(&pureEnter); + return; + } } if (e->key() == Qt::Key_Tab && e->modifiers() == Qt::NoModifier)