diff --git a/lib/Vt102Emulation.cpp b/lib/Vt102Emulation.cpp index 802e9ad3..91b6e93e 100644 --- a/lib/Vt102Emulation.cpp +++ b/lib/Vt102Emulation.cpp @@ -1143,9 +1143,18 @@ void Vt102Emulation::sendKeyEvent(QKeyEvent* origEvent, bool fromPaste) else if (event->key() == Qt::Key_PageDown) { textToSend += "\033[6~"; } - else { + else if (event->text().length() > 0) { textToSend += _codec->fromUnicode(event->text()); } + else if (event->key() <= 0xFFFF) { + QChar c(event->key()); + + if (c.isLetter()) { + c = ((modifiers & Qt::ShiftModifier) != 0) ? c.toUpper() : c.toLower(); + } + + textToSend += _codec->fromUnicode(QString(c)); + } if (!fromPaste && textToSend.length()) { Q_EMIT outputFromKeypressEvent();