--- AGReader/Sources/Input.c.keys 2006-05-27 12:01:05.000000000 +0200
+++ AGReader/Sources/Input.c 2006-05-28 12:02:06.000000000 +0200
@@ -163,7 +163,11 @@
{
static char *Keys[] = {
"OA", "OB", "OC","OD", /* Cursor keys */
- "[5~","[6~","[H","[F",NULL /* PgDown, PgUp, End, Home */
+ "[5~","[6~","[H","[F", /* PgDown, PgUp, End, Home */
+ "[1~","[4~","OH","OF", /* 2x Alternative End, Home */
+ "[11~","[12~", "[13~", /* F1, F2, F3 */
+ "OP" ,"OQ", "OR", /* Alternative F1, F2, F3 */
+ "[[A","[[B","[[C", NULL /* Linux console F1, F2, F3 */
};
static char *StrNode[] = {
"help", "index", "table of content"
@@ -178,7 +182,9 @@
/* Get a single char from stdin */
*p = getchr();
/* A escape char indicates beginning of command */
- if(*p == '\033') *(p=buffer) = '\033'; *++p = 0;
+ if(*p == '\033') *(p=buffer) = '\033';
+
+ *++p = 0;
/* Special sequence ? */
if( buffer[0]=='\033' )
@@ -202,6 +208,19 @@
case 5: scroll_vert(&terminfo, terminfo.height-2); break;
case 6: scroll_vert(&terminfo, -0x7fff); break;
case 7: scroll_vert(&terminfo, 0x7fff); break;
+ case 8: scroll_vert(&terminfo, -0x7fff); break;
+ case 9: scroll_vert(&terminfo, 0x7fff); break;
+ case 10: scroll_vert(&terminfo, -0x7fff); break;
+ case 11: scroll_vert(&terminfo, 0x7fff); break;
+ case 12: p[-1] = '1'; goto singleton;
+ case 13: p[-1] = '2'; goto singleton;
+ case 14: p[-1] = '3'; goto singleton;
+ case 15: p[-1] = '1'; goto singleton;
+ case 16: p[-1] = '2'; goto singleton;
+ case 17: p[-1] = '3'; goto singleton;
+ case 18: p[-1] = '1'; goto singleton;
+ case 19: p[-1] = '2'; goto singleton;
+ case 20: p[-1] = '3'; goto singleton;
}
p=buffer;
} else goto singleton;