changeset 22569:d3adf6999939 stable

gui: pass Page Up and Page Down keys to terminal correctly with Qt 5 (bug #49234) * Vt102Emulation.cpp (Vt102Emulation::sendKeyEvent): Handle Page Up and Page Down key events and pass the appropriate control sequence to the terminal. Adapted from https://github.com/lxde/qtermwidget/commit/58c4da34.
author Mike Miller <mtmiller@octave.org>
date Fri, 30 Sep 2016 17:23:39 -0700
parents 6b2a1b2c1576
children 17f6ed063c69 83f106bfcb37
files libgui/qterminal/libqterminal/unix/Vt102Emulation.cpp
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/qterminal/libqterminal/unix/Vt102Emulation.cpp	Fri Sep 30 17:17:35 2016 -0700
+++ b/libgui/qterminal/libqterminal/unix/Vt102Emulation.cpp	Fri Sep 30 17:23:39 2016 -0700
@@ -979,6 +979,14 @@
         {
             textToSend += _codec->fromUnicode(entry.text(true,modifiers));
         }
+        else if (event->key() == Qt::Key_PageUp)
+        {
+            textToSend += "\033[5~";
+        }
+        else if (event->key() == Qt::Key_PageDown)
+        {
+            textToSend += "\033[6~";
+        }
         else
             textToSend += _codec->fromUnicode(event->text());