Skip to content

Experiment with a 100ms timeout on ESC - #416

Merged
Leonard Hecker (lhecker) merged 1 commit into
mainfrom
dev/lhecker/243-esc-timeout
Jun 4, 2025
Merged

Leonard Hecker (lhecker) merged 1 commit into
mainfrom
dev/lhecker/243-esc-timeout

Conversation

@lhecker

Copy link
Copy Markdown
Member

@lhecker
Leonard Hecker (lhecker) merged commit 03a4e39 into main Jun 4, 2025
@lhecker
Leonard Hecker (lhecker) deleted the dev/lhecker/243-esc-timeout branch June 4, 2025 16:00
@j4james

Copy link
Copy Markdown

Leonard Hecker (@lhecker) While I think a longer timeout is preferable for key parsing anyway, note that the problem in issue #243 could be solved more reliably by removing the timeout altogether in the setup_terminal method here:

let Some(input) = sys::read_stdin(&scratch, vt_parser.read_timeout()) else {

By that I mean an infinite timeout, or at least something like a couple of seconds if you want to be really safe. Because you're assumedly not dealing with keypresses where you need to recognise a solitary escape. Everything you receive at that point should be a full escape sequence.

@lhecker

Copy link
Copy Markdown
Member Author

Oh, that's a good idea! Thank you for that!

@lhecker

Copy link
Copy Markdown
Member Author

I opened #424.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants