From 0abc96af5deb5895bc43355554a4f66b46d42acf Mon Sep 17 00:00:00 2001 From: "G.K.MacGregor" Date: Tue, 16 Feb 2021 18:19:29 +0000 Subject: [PATCH] Filter Ctrl keypresses in main widget --- mainwidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mainwidget.cpp b/mainwidget.cpp index 98cd5a9..c532607 100644 --- a/mainwidget.cpp +++ b/mainwidget.cpp @@ -248,6 +248,8 @@ void TeletextWidget::keyPressEvent(QKeyEvent *event) // A character-typing key was pressed // Try to keymap it, if not keymapped then plain ASCII code (may be) returned char mappedKeyPress = keymapping[m_pageRender.level1CharSet(m_teletextDocument->cursorRow(), m_teletextDocument->cursorColumn())].value(event->text().at(0), *qPrintable(event->text())); + if (mappedKeyPress < 0x20) + return; // If outside ASCII map then the character can't be represented by current Level 1 character set // Map it to block character so it doesn't need to be inserted-between later on if (mappedKeyPress & 0x80)