summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2023-02-16 20:32:23 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2023-02-16 20:35:07 +0100
commitf95834446f8d722cc09b4ed8eab642d1cc01c505 (patch)
tree8326171c27108069d5d458f5723bcbbdb128e056
parent3ee28da0f47d6a3b59d1c8493374df4e01bc0af4 (diff)
sfeed_curses: add SCO keys for next, prior (CSI I and CSI G)
This fixes the page up and page down keys in the cons25 console on DragonFlyBSD. See also the table: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html Section "Non-Function Keys".
-rw-r--r--sfeed_curses.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sfeed_curses.c b/sfeed_curses.c
index abfa95b..841f276 100644
--- a/sfeed_curses.c
+++ b/sfeed_curses.c
@@ -2119,12 +2119,15 @@ main(int argc, char *argv[])
mousereport(button, release, keymask, x - 1, y - 1);
break;
+ /* DEC/SUN: ESC O char, HP: ESC char or SCO: ESC [ char */
case 'A': goto keyup; /* arrow up */
case 'B': goto keydown; /* arrow down */
case 'C': goto keyright; /* arrow right */
case 'D': goto keyleft; /* arrow left */
case 'F': goto endpos; /* end */
+ case 'G': goto nextpage; /* page down */
case 'H': goto startpos; /* home */
+ case 'I': goto prevpage; /* page up */
default:
if (!(ch >= '0' && ch <= '9'))
break;