From c9680b8b64c893b8392866c80f70b81b6c423162 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Thu, 1 Dec 2016 16:51:40 +0100
Subject: [PATCH] input: add the shifted PageUp and PageDown keycodes produced
 by VTE

Modern VTE-based terminals now produce codes for those keys and
no longer swallow them when nano is active.

This addresses https://savannah.gnu.org/bugs/?49746.
---
 src/winio.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/winio.c b/src/winio.c
index 693c81ea..f75304fc 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -632,12 +632,18 @@ int parse_kbinput(WINDOW *win)
 	case KEY_C1:	/* End (1) on keypad with NumLock off. */
 	    return KEY_END;
 #ifndef NANO_TINY
-	case SHIFT_PAGEUP:		/* Fake key, from Shift+Alt+Up. */
+#ifdef KEY_SPREVIOUS
+	case KEY_SPREVIOUS:
+#endif
+	case SHIFT_PAGEUP:	/* Fake key, from Shift+Alt+Up. */
 	    shift_held = TRUE;
 #endif
 	case KEY_A3:	/* PageUp (9) on keypad with NumLock off. */
 	    return KEY_PPAGE;
 #ifndef NANO_TINY
+#ifdef KEY_SNEXT
+	case KEY_SNEXT:
+#endif
 	case SHIFT_PAGEDOWN:	/* Fake key, from Shift+Alt+Down. */
 	    shift_held = TRUE;
 #endif
-- 
GitLab