--- a/gntkeys.c Sat Oct 04 23:36:52 2008 +0000
+++ b/gntkeys.c Thu Oct 30 17:54:26 2008 +0000
@@ -102,7 +102,12 @@
#define INSERT_COMB(k, code) do { \
snprintf(key, sizeof(key), "%s%s%s", controls[c], alts[a], k); \
+#define INSERT_COMB_CODE(k, c1, c2) do { \ + snprintf(__, sizeof(__), "%s%s", c1, c2); \ /* Lower-case alphabets */
for (a = 0, c = 0; controls[c]; c++, a = 0) {
@@ -124,6 +129,10 @@
INSERT_COMB("tab", "\033\t");
+ INSERT_COMB_CODE("up", "\033", GNT_KEY_UP); + INSERT_COMB_CODE("down", "\033", GNT_KEY_DOWN); + INSERT_COMB_CODE("left", "\033", GNT_KEY_LEFT); + INSERT_COMB_CODE("right", "\033", GNT_KEY_RIGHT); @@ -144,6 +153,8 @@
void gnt_keys_refine(char *text)
+ while (*text == 27 && *(text + 1) == 27) if (*text == 27 && *(text + 1) == '[' &&
(*(text + 2) >= 'A' && *(text + 2) <= 'D')) {
/* Apparently this is necessary for urxvt and screen and xterm */