[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev Keymap printing patch
From: |
Ilya Zakharevich |
Subject: |
lynx-dev Keymap printing patch |
Date: |
Thu, 26 Nov 1998 16:36:06 -0500 (EST) |
I was puzzled why lynx would not print its DOWN_TWO binding. The
following patch resulted. Note that
a) This patch does not help with bindings keys which are not visible
in the current font: try binding 0x81, this will result in some
invisible entry (is not this a bug in the display code?);
b) This prints some unexpected funny bindings, like
0x1b8 ABORT quit the browser unconditionally
0x1cb ACTIVATE go to the document given by the current link
0x1cf IMAGE_TOGGLE toggle handling of all images as links
0x1d0 PREV_PAGE view the previous page of the document
0x1d1 NEXT_PAGE view the next page of the document
Do not know why. (But the code printing this is important to debug
assignments similar to KEYMAP:0x210:LEFT_LINK.)
Enjoy,
Ilya
--- ./src/LYKeymap.c~ Tue Nov 10 14:47:38 1998
+++ ./src/LYKeymap.c Thu Nov 26 16:26:10 1998
@@ -641,6 +641,8 @@ PRIVATE char *pretty ARGS1 (int, c)
sprintf(buf, "^%c", c|0100);
else if (c >= 0400 && (c - 0400) < (int) TABLESIZE(funckey))
sprintf(buf, "%s", funckey[c-0400]);
+ else if (c >= 0400)
+ sprintf(buf, "%#x", c);
else
return 0;
@@ -726,7 +728,7 @@ PRIVATE int LYLoadKeymap ARGS4 (
/*
* LYK_PIPE not implemented yet.
*/
- if ((i > (int) TABLESIZE(keymap) || i <= ' ' || !isalpha(i-1)) &&
+ if ((i <= 'a' || i > 'z' + 1) && (i <= 'A' || i > 'Z' + 1) &&
strcmp(revmap[keymap[i]].name, "PIPE")) {
print_binding(target, buf, i);
}
- lynx-dev Keymap printing patch,
Ilya Zakharevich <=