summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2023-02-16 20:33:51 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2023-02-16 20:35:36 +0100
commiteb635966d33e2718094aab9d6ee06b5655b8efeb (patch)
treea5f7a261072a9c8665612b35883d05f1402599a1
parentf95834446f8d722cc09b4ed8eab642d1cc01c505 (diff)
sfeed_curses: add SUN keys support
This fixes the keys on the sun-color console on OpenIndiana/Illumos/OpenSolaris (and other systems using these keys). See also the table: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html Section "Non-Function Keys".
-rw-r--r--sfeed_curses.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sfeed_curses.c b/sfeed_curses.c
index 841f276..50080cf 100644
--- a/sfeed_curses.c
+++ b/sfeed_curses.c
@@ -2146,6 +2146,13 @@ main(int argc, char *argv[])
case 7: goto startpos; /* home: urxvt */
case 8: goto endpos; /* end: urxvt */
}
+ } else if (ch == 'z') { /* SUN: ESC [ num z */
+ switch (i) {
+ case 214: goto startpos; /* home */
+ case 216: goto prevpage; /* page up */
+ case 220: goto endpos; /* end */
+ case 222: goto nextpage; /* page down */
+ }
}
break;
}