Skip to content

Commit f6d5dcd

Browse files
committed
Ncurses: use ESCDELAY environment variable instead of a custom one
1 parent b0df20d commit f6d5dcd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ The following environment variables are also taken into account:
314314
315315
* `TERM`: Ncurses uses it to determine terminal capabilities. It is set automatically by the terminal emulator.
316316
* `COLORTERM`: when set to `truecolor` or `24bit`, Turbo Vision will assume the terminal emulator supports 24-bit color. It is set automatically by terminal emulators that support it.
317-
* `TVISION_ESCDELAY`: the number of milliseconds to wait after receiving an ESC key press, default `10`. If another key is pressed during this delay, it will be interpreted as an Alt+Key combination. Using a larger value is useful when the terminal doesn't support the Alt key.
317+
* `ESCDELAY`: the number of milliseconds to wait after receiving an ESC key press, default `10`. If another key is pressed during this delay, it will be interpreted as an Alt+Key combination. Using a larger value is useful when the terminal doesn't support the Alt key.
318318
* `TVISION_USE_STDIO`: when not empty, terminal I/O is performed through `stdin`/`stdout`, so that it can be redirected from the shell. By default, Turbo Vision performs terminal I/O through `/dev/tty`, allowing the user to redirect `stdin`, `stdout` and `stderr` for their needs, without affecting the application's stability.
319319
320320
For example, the following will leave `out.txt` empty:

source/platform/ncursinp.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ NcursesInput::NcursesInput( ConsoleCtl &aCon, NcursesDisplay &,
291291
/* Do not delay too much on ESC key presses, as the Alt modifier works well
292292
* in most modern terminals. Still, this delay helps ncurses distinguish
293293
* special key sequences, I believe. */
294-
set_escdelay(getEnv<int>("TVISION_ESCDELAY", 10));
294+
set_escdelay(getEnv<int>("ESCDELAY", 10));
295295

296296
TermIO::keyModsOn(con);
297297
if (mouseEnabled)

0 commit comments

Comments
 (0)