diff --git a/Telegram/_qt_5_5_0_patch/qtbase/src/widgets/widgets/qwidgettextcontrol.cpp b/Telegram/_qt_5_5_0_patch/qtbase/src/widgets/widgets/qwidgettextcontrol.cpp index f3de5397c2280b..0bab479c90f64c 100644 --- a/Telegram/_qt_5_5_0_patch/qtbase/src/widgets/widgets/qwidgettextcontrol.cpp +++ b/Telegram/_qt_5_5_0_patch/qtbase/src/widgets/widgets/qwidgettextcontrol.cpp @@ -74,6 +74,7 @@ #include #include #include +#include #ifndef QT_NO_SHORTCUT #include "private/qapplication_p.h" @@ -1341,11 +1342,15 @@ void QWidgetTextControlPrivate::keyPressEvent(QKeyEvent *e) process: { - // QTBUG-35734: ignore Ctrl/Ctrl+Shift; accept only AltGr (Alt+Ctrl) on German keyboards - if (e->modifiers() == Qt::ControlModifier - || e->modifiers() == (Qt::ShiftModifier | Qt::ControlModifier)) { - e->ignore(); - return; + if (QGuiApplication::inputMethod()->locale().language() == QLocale::German) + { + // QTBUG-35734: ignore Ctrl/Ctrl+Shift; accept only AltGr (Alt+Ctrl) on German keyboards + // + if (e->modifiers() == Qt::ControlModifier + || e->modifiers() == (Qt::ShiftModifier | Qt::ControlModifier)) { + e->ignore(); + return; + } } QString text = e->text(); if (!text.isEmpty() && (text.at(0).isPrint() || text.at(0) == QLatin1Char('\t') || text.at(0).unicode() == 0x200C || text.at(0).unicode() == 0x200D)) {