Skip to content

Add readKey sequence timeout#31

Merged
prateekbhujel merged 2 commits into
mainfrom
prateek/readkey-sequence-timeout
Jun 6, 2026
Merged

Add readKey sequence timeout#31
prateekbhujel merged 2 commits into
mainfrom
prateek/readkey-sequence-timeout

Conversation

@prateekbhujel
Copy link
Copy Markdown
Owner

@prateekbhujel prateekbhujel commented Jun 6, 2026

This lets callers tune how long Terminal::readKey() waits for bytes that complete an escape / UTF-8 sequence after the first byte.

The default stays 25ms. Passing a longer sequence timeout helps slow SSH/PTY cases where Esc arrives before the rest of an arrow-key sequence.

Changed:

  • add optional $sequenceTimeout to Terminal::readKey()
  • keep Windows runtime behavior unchanged because Windows reads key events, not escape bytes
  • add POSIX pty coverage for a delayed arrow-key sequence
  • remove the Windows master CI leg because php.net now publishes master deps under VS18 while php/php-windows-builder@v1 still requests the missing VS17 package URL; Unix nightly and Windows 8.2-8.5 TS/NTS coverage stay in place

Tested:

  • make test REPORT_EXIT_STATUS=1 NO_INTERACTION=1 TEST_PHP_EXECUTABLE=/Applications/XAMPP/xamppfiles/bin/php (12/12 passed)

@prateekbhujel prateekbhujel merged commit 3eb8409 into main Jun 6, 2026
13 checks passed
@prateekbhujel prateekbhujel deleted the prateek/readkey-sequence-timeout branch June 6, 2026 08:18
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.

1 participant