[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev [PATCH 2.8.4dev.10] Enable binding ESC
From: |
Ilya Zakharevich |
Subject: |
lynx-dev [PATCH 2.8.4dev.10] Enable binding ESC |
Date: |
Fri, 19 Jan 2001 00:40:12 -0500 |
User-agent: |
Mutt/1.2.5i |
This patch allows binding ESC to perform some action (such as
INTERRUPT:ABORT, or something else). It is useful only if the curses
(or similar) package remaps all the reasonable escape sequences, so
Lynx internal escape-sequence processing is not needed.
With curses one needs also to set ESCDELAY env var to a reasonable value
(milliseconds to wait for a key after ESC).
Since my previous patch to macroize interruption was lost, I cannot
make keys bound to INTERRUPT work in all the situations one wants to.
Additionally, more useful action to perform while in a textareas is
also wanted. But these are orthogonal topics to one addressed in this
patch.
Enjoy,
Ilya
--- ./LYEditmap.c-preescape Wed Dec 15 06:03:18 1999
+++ ./LYEditmap.c Thu Jan 18 22:31:38 2001
@@ -27,6 +27,8 @@
PUBLIC int current_lineedit = 0; /* Index into LYLineEditors[] */
+PUBLIC int escape_bound = 0; /* User wanted Escape to perform actions? */
+
/*
* See LYStrings.h for the LYE definitions.
*/
--- ./LYKeymap.c-preescape Sun Oct 15 21:39:38 2000
+++ ./LYKeymap.c Thu Jan 18 23:27:36 2001
@@ -1359,6 +1359,8 @@ PUBLIC int lkcstring_to_lkc ARGS1(
#endif
#endif
}
+ if (c == CH_ESC)
+ escape_bound = 1;
if (c < -1)
return (-1);
else
--- ./LYStrings.c-preescape Thu Jan 18 23:32:08 2001
+++ ./LYStrings.c Fri Jan 19 00:11:30 2001
@@ -1665,7 +1665,9 @@ re_read:
}
#endif /* USE_SLANG */
- if (c == CH_ESC || (csi_is_csi && c == (unsigned char)CH_ESC_PAR)) { /*
handle escape sequence S/390 -- gil -- 2024 */
+ if (!escape_bound
+ && (c == CH_ESC || (csi_is_csi && c == (unsigned char)CH_ESC_PAR))) {
+ /* handle escape sequence S/390 -- gil -- 2024 */
done_esc = TRUE; /* Flag: we did it, not keypad() */
b = GetChar();
@@ -4498,6 +4500,7 @@ restore_popup_statusline:
case LYK_QUIT:
case LYK_ABORT:
case LYK_PREV_DOC:
+ case LYK_INTERRUPT:
cur_choice = orig_choice;
cmd = LYK_ACTIVATE; /* to exit */
break;
--- ./LYStrings.h-preescape Thu Jan 18 21:39:50 2001
+++ ./LYStrings.h Thu Jan 18 22:30:08 2001
@@ -332,6 +332,8 @@ extern CONST char * LYLineeditHelpURLs[]
extern CONST char * LYLineeditHelpURL NOPARAMS;
+extern int escape_bound;
+
#define LYLineEdit(e,c,m) LYEdit1(e,c,EditBinding(c)&~LYE_DF,m)
/* Dummy initializer for LYEditmap.c */
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- lynx-dev [PATCH 2.8.4dev.10] Enable binding ESC,
Ilya Zakharevich <=