commit 082bf2ceb8f91792c4fce2cbbc7a83de5e8f0294
parent ffaa4da70eb7a83162f8609f71a25936ad31c0ed
Author: Rob King <deadpixi@users.noreply.github.com>
Date: Sun, 21 Aug 2022 22:06:38 -0500
Merge pull request #60 from mspielberg/escdelay
Allow setting the escape key delay
Diffstat:
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/config.def.h b/config.def.h
@@ -26,6 +26,12 @@
#define DEFAULT_TERMINAL "screen-bce"
#define DEFAULT_256_COLOR_TERMINAL "screen-256color-bce"
+/* Sets how long (in milliseconds) mtm should wait for an escape sequence
+ * to follow after the escape key is pressed before sending it on to
+ * the focused virtual terminal.
+ */
+#define ESCAPE_TIME 500
+
/* mtm supports a scrollback buffer, allowing users to scroll back
* through the output history of a virtual terminal. The SCROLLBACK
* knob controls how many lines are saved (minus however many are
diff --git a/mtm.c b/mtm.c
@@ -1154,6 +1154,7 @@ main(int argc, char **argv)
if (!initscr())
quit(EXIT_FAILURE, "could not initialize terminal");
+ ESCDELAY = ESCAPE_TIME;
raw();
noecho();
nonl();