[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[5791] document key-time variable
From: |
Gavin D. Smith |
Subject: |
[5791] document key-time variable |
Date: |
Sun, 31 Aug 2014 18:08:40 +0000 |
Revision: 5791
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5791
Author: gavin
Date: 2014-08-31 18:08:39 +0000 (Sun, 31 Aug 2014)
Log Message:
-----------
document key-time variable
Modified Paths:
--------------
trunk/ChangeLog
trunk/NEWS
trunk/doc/info-stnd.texi
trunk/info/session.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2014-08-31 17:21:57 UTC (rev 5790)
+++ trunk/ChangeLog 2014-08-31 18:08:39 UTC (rev 5791)
@@ -3,6 +3,10 @@
* info/session.c (incremental_search): Update an automatic footnotes
window if we change node.
+ * info/session.c (get_input_key_internal): Don't time-out key press if
+ 'key-time' is 0.
+ * doc/info-stnd.texi (Variables): Document 'key-time' variable.
+
2014-08-30 Gavin Smith <address@hidden>
* info/session.c (incremental_search): Go back to being
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2014-08-31 17:21:57 UTC (rev 5790)
+++ trunk/NEWS 2014-08-31 18:08:39 UTC (rev 5791)
@@ -51,6 +51,8 @@
read directly by info.
. new variable `highlight-searches' allows highlighting results from a search
. support for mouse scrollwheel, controlled by 'mouse' variable
+ . new variable 'key_time' to control how long to wait for byte
+ sequences sent by special keys
* install-info:
. handle compressed input file names containing spaces.
Modified: trunk/doc/info-stnd.texi
===================================================================
--- trunk/doc/info-stnd.texi 2014-08-31 17:21:57 UTC (rev 5790)
+++ trunk/doc/info-stnd.texi 2014-08-31 18:08:39 UTC (rev 5791)
@@ -2171,6 +2171,23 @@
the European standard character set is in use, and allows you to input
such characters to Info, as well as display them.
address@hidden key-time
address@hidden key-time
address@hidden slow network connections
+Length of time in milliseconds to wait for the next byte of a byte
+sequence generated by a key (or key chord) on the keyboard. For
+example, if the @kbd{down} key generates the byte sequence
address@hidden@key{ESC} O B}, and the two bytes @address@hidden O} have been
+received, then a @kbd{B} byte would have to be received within this
+length of time for a key press of @kbd{down} to be registered. You
+may wish to set this variable to a larger value for slow terminals or
+network connections.
+
+Set this variable to 0 to wait indefinitely for the next byte. If you
+do this, you will not be able to use some keys that generate sequences
+that are initial subsequences of those generated by other keys; for
+example, @key{ESC}, @kbd{M-O} and @kbd{M-[}.
+
@anchor{min-search-length}
@item min-search-length
Minimum length of a search string (default 1). Attempts to initiate a
Modified: trunk/info/session.c
===================================================================
--- trunk/info/session.c 2014-08-31 17:21:57 UTC (rev 5790)
+++ trunk/info/session.c 2014-08-31 18:08:39 UTC (rev 5791)
@@ -605,7 +605,7 @@
/* Time in milliseconds to wait for the next byte of a byte sequence
corresponding to a key or key chord. Settable with the 'key-time' user
- variable. */
+ variable. If zero, wait indefinitely. */
int key_time = 100;
/* Read bytes from input and return what key has been pressed. Return -1 on
@@ -661,15 +661,20 @@
{
int ready = 0;
#if defined (FD_SET)
- struct timeval timer;
+ struct timeval timer, *timerp = 0;
fd_set readfds;
FD_ZERO (&readfds);
FD_SET (fileno (info_input_stream), &readfds);
- timer.tv_sec = 0;
- timer.tv_usec = key_time * 1000;
+
+ if (key_time)
+ {
+ timer.tv_sec = 0;
+ timer.tv_usec = key_time * 1000;
+ timerp = &timer;
+ }
ready = select (fileno(info_input_stream)+1, &readfds,
- NULL, NULL, &timer);
+ NULL, NULL, timerp);
#else
ready = 1;
#endif /* FD_SET */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [5791] document key-time variable,
Gavin D. Smith <=