From 514df0536249011a390690e1a1eb8267840701f6 Mon Sep 17 00:00:00 2001 From: Guy Shefy <49814019+goolmoos@users.noreply.github.com> Date: Sat, 31 May 2025 15:45:18 +0300 Subject: [PATCH] Reduce default ttimeoutlen This timeout is for delay between two machine inputs, not human inputs, so there is no need for it to be so long. with the reduced value, bindings on 'escape' are now reasonably usable. --- src/prompt_toolkit/application/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/prompt_toolkit/application/application.py b/src/prompt_toolkit/application/application.py index d93c24398..69d2ec0d1 100644 --- a/src/prompt_toolkit/application/application.py +++ b/src/prompt_toolkit/application/application.py @@ -289,7 +289,7 @@ def __init__( #: after "\x1b". This little timer will consider "\x1b" to be escape if #: nothing did follow in this time span. #: This seems to work like the `ttimeoutlen` option in Vim. - self.ttimeoutlen = 0.5 # Seconds. + self.ttimeoutlen = 0.05 # Seconds. #: Like Vim's `timeoutlen` option. This can be `None` or a float. For #: instance, suppose that we have a key binding AB and a second key